Messages in this thread Patch in this message |  | | Date | Tue, 8 Feb 2011 20:14:10 +0800 | | From | Yong Zhang <> | | Subject | [PATCH 2/2] timer: use local_bh_enable_force_wake() in del_timer_sync() |
| |
From: Yong Zhang <yong.zhang0@gmail.com> Subject: [PATCH 2/2] timer: use local_bh_enable_force_wake() in del_timer_sync()
raw_local_irq_save()/raw_local_irq_restore() is also not suitable here because lockdep will report "possible reason: unannotated irqs-off"
To cure this issue, use local_bh_enable_force_wake() here in case of we have pending softirq left during this time.
Reported-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Yong Zhang <yong.zhang0@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> --- kernel/timer.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/kernel/timer.c b/kernel/timer.c index d53ce66..1654dc1 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -969,14 +969,10 @@ EXPORT_SYMBOL(try_to_del_timer_sync); int del_timer_sync(struct timer_list *timer) { #ifdef CONFIG_LOCKDEP - unsigned long flags; - - raw_local_irq_save(flags); local_bh_disable(); lock_map_acquire(&timer->lockdep_map); lock_map_release(&timer->lockdep_map); - _local_bh_enable(); - raw_local_irq_restore(flags); + local_bh_enable_force_wake(); #endif /* * don't use it in hardirq context, because it -- 1.7.1
|  |