summaryrefslogtreecommitdiffstats
path: root/kernel/sched_idletask.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2009-12-13 00:07:30 +0100
committerIngo Molnar <mingo@elte.hu>2009-12-13 08:12:46 +0100
commit7539a3b3d1f892dd97eaf094134d7de55c13befe (patch)
treef49c29135265e452208c5a2e404590f2e0becbc8 /kernel/sched_idletask.c
parentf40542532e96dda5506eb76badea322f2ae4731c (diff)
downloadop-kernel-dev-7539a3b3d1f892dd97eaf094134d7de55c13befe.zip
op-kernel-dev-7539a3b3d1f892dd97eaf094134d7de55c13befe.tar.gz
sched: Make wakeup side and atomic variants of completion API irq safe
Alan Stern noticed that all the wakeup side (and atomic) variants of the completion APIs should be irq safe, but the newly introduced completion_done() and try_wait_for_completion() aren't. The use of the irq unsafe variants in IRQ contexts can cause crashes/hangs. Fix the problem by making them use spin_lock_irqsave() and spin_lock_irqrestore(). Reported-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Zhang Rui <rui.zhang@intel.com> Cc: pm list <linux-pm@lists.linux-foundation.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: David Chinner <david@fromorbit.com> Cc: Lachlan McIlroy <lachlan@sgi.com> LKML-Reference: <200912130007.30541.rjw@sisk.pl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_idletask.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud