diff options
Diffstat (limited to 'kernel/timer.c')
-rw-r--r-- | kernel/timer.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/kernel/timer.c b/kernel/timer.c index 03bc7f1f1593..e8019cc3418d 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -1435,9 +1435,11 @@ static void __cpuinit migrate_timers(int cpu) | |||
1435 | BUG_ON(cpu_online(cpu)); | 1435 | BUG_ON(cpu_online(cpu)); |
1436 | old_base = per_cpu(tvec_bases, cpu); | 1436 | old_base = per_cpu(tvec_bases, cpu); |
1437 | new_base = get_cpu_var(tvec_bases); | 1437 | new_base = get_cpu_var(tvec_bases); |
1438 | 1438 | /* | |
1439 | local_irq_disable(); | 1439 | * The caller is globally serialized and nobody else |
1440 | spin_lock(&new_base->lock); | 1440 | * takes two locks at once, deadlock is not possible. |
1441 | */ | ||
1442 | spin_lock_irq(&new_base->lock); | ||
1441 | spin_lock_nested(&old_base->lock, SINGLE_DEPTH_NESTING); | 1443 | spin_lock_nested(&old_base->lock, SINGLE_DEPTH_NESTING); |
1442 | 1444 | ||
1443 | BUG_ON(old_base->running_timer); | 1445 | BUG_ON(old_base->running_timer); |
@@ -1452,8 +1454,7 @@ static void __cpuinit migrate_timers(int cpu) | |||
1452 | } | 1454 | } |
1453 | 1455 | ||
1454 | spin_unlock(&old_base->lock); | 1456 | spin_unlock(&old_base->lock); |
1455 | spin_unlock(&new_base->lock); | 1457 | spin_unlock_irq(&new_base->lock); |
1456 | local_irq_enable(); | ||
1457 | put_cpu_var(tvec_bases); | 1458 | put_cpu_var(tvec_bases); |
1458 | } | 1459 | } |
1459 | #endif /* CONFIG_HOTPLUG_CPU */ | 1460 | #endif /* CONFIG_HOTPLUG_CPU */ |