aboutsummaryrefslogtreecommitdiff
path: root/kernel/mutex-debug.c
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2006-09-18 19:28:17 +0200
committerAdrian Bunk <bunk@stusta.de>2006-09-18 19:28:17 +0200
commit94744ac0cd723f01ca21c98ff21fedb79eef3c61 (patch)
tree8185b73fa56cecd55ba71ea226a15c42d886becb /kernel/mutex-debug.c
parentec2ffcb891b9a2d00deb38177e1267516ff2be15 (diff)
Convert idr's internal locking to _irqsave variant
Currently, the code in lib/idr.c uses a bare spin_lock(&idp->lock) to do internal locking. This is a nasty trap for code that might call idr functions from different contexts; for example, it seems perfectly reasonable to call idr_get_new() from process context and idr_remove() from interrupt context -- but with the current locking this would lead to a potential deadlock. The simplest fix for this is to just convert the idr locking to use spin_lock_irqsave(). In particular, this fixes a very complicated locking issue detected by lockdep, involving the ib_ipoib driver's priv->lock and dev->_xmit_lock, which get involved with the ib_sa module's query_idr.lock. Signed-off-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'kernel/mutex-debug.c')
0 files changed, 0 insertions, 0 deletions