Commit
597fbb8be6 ("xen/timers: Fix memory leak with cpu unplug/plug")
went a little too far: Migrating timers away from a CPU being offlined
needs to heppen independent of whether it get parked or fully offlined.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
{
struct timers *ts = &per_cpu(timers, cpu);
- migrate_timers_from_cpu(cpu);
-
ASSERT(heap_metadata(ts->heap)->size == 0);
if ( heap_metadata(ts->heap)->limit )
{
case CPU_UP_CANCELED:
case CPU_DEAD:
case CPU_RESUME_FAILED:
+ migrate_timers_from_cpu(cpu);
+
if ( !park_offline_cpus && system_state != SYS_STATE_suspend )
free_percpu_timers(cpu);
break;