lkml.org 
[lkml]   [2011]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RFC] rtmutex: Permit rt_mutex_unlock() to be invoked with irqs disabled
From
Date
On Tue, 2011-07-19 at 13:14 -0700, Paul E. McKenney wrote:
> Because rcu_read_unlock() can be invoked with interrupts disabled, it can
> in turn invoke rt_mutex_unlock() with interrupts disabled. This situation
> results in lockdep splats (https://lkml.org/lkml/2011/7/7/362) because the
> rt_mutex structure's ->lock_wait is acquired elsewhere without disabling
> interrupts, which can result in deadlocks.
>
> This commit therefore changes the rt_mutex structure's ->lock_wait
> acquisitions to disable interrupts.
>
> An alternative fix is to prohibit invoking rcu_read_unlock() with
> interrupts disabled unless the entire preceding RCU read-side critical
> section has run with interrupts disabled. However, there is already
> at least one case in mainline where this potential rule is violated,
> and there might well be many more. These would likely be found one at
> a time using the lockdep-water-torture method, hence the alternative
> fix in the form of this commit.

Thomas, I'm inclined to merge this, any objections?


\
 
 \ /
  Last update: 2011-07-21 13:35    [W:0.049 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site