summaryrefslogtreecommitdiff
path: root/drivers/infiniband/core/agent.c
diff options
context:
space:
mode:
authorRoland Dreier <rdreier@cisco.com>2009-09-23 22:10:15 +0400
committerRoland Dreier <rolandd@cisco.com>2009-09-23 22:10:15 +0400
commit0e442afd92fcdde2cc63b6f25556b8934e42b7d2 (patch)
tree49b2f52ee849e7888473eb228f1abe3c27ed9434 /drivers/infiniband/core/agent.c
parent86d710146fb9975f04c505ec78caa43d227c1018 (diff)
downloadlinux-0e442afd92fcdde2cc63b6f25556b8934e42b7d2.tar.xz
IB/mad: Fix lock-lock-timer deadlock in RMPP code
Holding agent->lock across cancel_delayed_work() (which does del_timer_sync()) in ib_cancel_rmpp_recvs() leads to lockdep reports of possible lock-timer deadlocks if a consumer ever does something that connects agent->lock to a lock taken in IRQ context (cf http://marc.info/?l=linux-rdma&m=125243699026045). Fix this by changing the list items to a new state "CANCELING" while holding the lock, and then canceling the delayed work without holding the lock. If the delayed work runs after the lock is dropped, it will see the state is CANCELING and return immediately, so the list will stay stable while we traverse it with the lock not held. Reviewed-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/core/agent.c')
0 files changed, 0 insertions, 0 deletions