diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2016-01-13 11:25:38 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2016-01-26 11:08:35 +0100 |
commit | b4abf91047cf054f203dcfac97e1038388826937 (patch) | |
tree | a018e1a33d72f3c8f154db82acad5b70858417ba /fs/udf | |
parent | 92e963f50fc74041b5e9e744c330dca48e04f08d (diff) | |
download | linux-b4abf91047cf054f203dcfac97e1038388826937.tar.bz2 |
rtmutex: Make wait_lock irq safe
Sasha reported a lockdep splat about a potential deadlock between RCU boosting
rtmutex and the posix timer it_lock.
CPU0 CPU1
rtmutex_lock(&rcu->rt_mutex)
spin_lock(&rcu->rt_mutex.wait_lock)
local_irq_disable()
spin_lock(&timer->it_lock)
spin_lock(&rcu->mutex.wait_lock)
--> Interrupt
spin_lock(&timer->it_lock)
This is caused by the following code sequence on CPU1
rcu_read_lock()
x = lookup();
if (x)
spin_lock_irqsave(&x->it_lock);
rcu_read_unlock();
return x;
We could fix that in the posix timer code by keeping rcu read locked across
the spinlocked and irq disabled section, but the above sequence is common and
there is no reason not to support it.
Taking rt_mutex.wait_lock irq safe prevents the deadlock.
Reported-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'fs/udf')
0 files changed, 0 insertions, 0 deletions