[ofa-general] RE: [PATCH/RFC] IB/mad: Fix lock-lock-timer deadlock in RMPP code (was: [NEW PATCH] IB/mad: Fix possible lock-lock-timer deadlock)
Sean Hefty
sean.hefty at intel.com
Wed Sep 9 14:22:28 PDT 2009
>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).
>
>However, it seems this locking is not necessary here, since the locking
>did not prevent the rmpp_list from having an item added immediately
>after the lock is dropped -- so there must be sufficient synchronization
>protecting the rmpp_list without the locking here. Therefore, we can
>fix the lockdep issue by simply deleting the locking.
The locking is needed to protect against items being removed from rmpp_list in
recv_timeout_handler() and recv_cleanup_handler(). No new items should be added
to the rmpp_list when ib_cancel_rmpp_recvs() is running (or there's a separate
bug).
- Sean
More information about the general
mailing list