summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2012-03-01 13:55:29 -0500
committerClark Williams <williams@redhat.com>2012-04-13 11:01:52 -0500
commited2f779f3f8f13809df5f95ffa5e18a8879446fc (patch)
tree6efca177e4e96ef79c62d364b8601de232fb9c09
parent4e481b5981e818fe35d04dfec59ee0917920c1d9 (diff)
futex/rt: Fix possible lockup when taking pi_lock in proxy handler
When taking the pi_lock, we must disable interrupts because the pi_lock can also be taken in an interrupt handler. Use raw_spin_lock_irq() instead of raw_spin_lock(). Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Cc: Carsten Emde <C.Emde@osadl.org> Cc: John Kacur <jkacur@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Clark Williams <clark.williams@gmail.com> Cc: stable-rt@vger.kernel.org Link: http://lkml.kernel.org/r/20120301190345.165160680@goodmis.org Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--kernel/rtmutex.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c
index 921c90b8d188..3bff72606b07 100644
--- a/kernel/rtmutex.c
+++ b/kernel/rtmutex.c
@@ -1365,14 +1365,14 @@ int rt_mutex_start_proxy_lock(struct rt_mutex *lock,
* PI_REQUEUE_INPROGRESS, so that if the task is waking up
* it will know that we are in the process of requeuing it.
*/
- raw_spin_lock(&task->pi_lock);
+ raw_spin_lock_irq(&task->pi_lock);
if (task->pi_blocked_on) {
- raw_spin_unlock(&task->pi_lock);
+ raw_spin_unlock_irq(&task->pi_lock);
raw_spin_unlock(&lock->wait_lock);
return -EAGAIN;
}
task->pi_blocked_on = PI_REQUEUE_INPROGRESS;
- raw_spin_unlock(&task->pi_lock);
+ raw_spin_unlock_irq(&task->pi_lock);
#endif
ret = task_blocks_on_rt_mutex(lock, waiter, task, detect_deadlock);