diff options
| author | Suresh Siddha <[email protected]> | 2009-08-17 21:34:59 +0000 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2009-08-19 16:15:10 +0000 |
| commit | f833bab87fca5c3ce13778421b1365845843b976 (patch) | |
| tree | 020c3e6a70dba34544c963c34647b605035be8fb /lib/flex_array.c | |
| parent | timers: Drop write permission on /proc/timer_list (diff) | |
| download | kernel-f833bab87fca5c3ce13778421b1365845843b976.tar.gz kernel-f833bab87fca5c3ce13778421b1365845843b976.zip | |
clockevent: Prevent dead lock on clockevents_lock
Currently clockevents_notify() is called with interrupts enabled at
some places and interrupts disabled at some other places.
This results in a deadlock in this scenario.
cpu A holds clockevents_lock in clockevents_notify() with irqs enabled
cpu B waits for clockevents_lock in clockevents_notify() with irqs disabled
cpu C doing set_mtrr() which will try to rendezvous of all the cpus.
This will result in C and A come to the rendezvous point and waiting
for B. B is stuck forever waiting for the spinlock and thus not
reaching the rendezvous point.
Fix the clockevents code so that clockevents_lock is taken with
interrupts disabled and thus avoid the above deadlock.
Also call lapic_timer_propagate_broadcast() on the destination cpu so
that we avoid calling smp_call_function() in the clockevents notifier
chain.
This issue left us wondering if we need to change the MTRR rendezvous
logic to use stop machine logic (instead of smp_call_function) or add
a check in spinlock debug code to see if there are other spinlocks
which gets taken under both interrupts enabled/disabled conditions.
Signed-off-by: Suresh Siddha <[email protected]>
Signed-off-by: Venkatesh Pallipadi <[email protected]>
Cc: "Pallipadi Venkatesh" <[email protected]>
Cc: "Brown Len" <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Diffstat (limited to 'lib/flex_array.c')
0 files changed, 0 insertions, 0 deletions
