Re: [PATCH for-next] iw_cxgb4: Fix possible circular dependency locking warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2017-11-09 at 08:44 -0600, Steve Wise wrote:
> > 
> > Locking sequence of iw_cxgb4 and RoCE drivers in ib_register_device() is
> > slightly different and this leads to possible circular dependency locking
> > warning when both the devices are brought up.
> > 
> > Here is the locking sequence upto ib_register_device():
> > iw_cxgb4: rtnl_mutex(net stack) --> uld_mutex --> device_mutex
> > RoCE drivers: device_mutex --> rtnl_mutex
> > 
> > Here is the possibility of cross locking:
> > 
> > 	CPU #0 (iw_cxgb4) 		     CPU #1 (RoCE drivers)
> > 
> > -> on interface up cxgb4_up()
> > executed with rtnl_mutex held
> > -> hold uld_mutex and try
> > registering ib device
> > 					-> In ib_register_device() hold
> > 					   device_mutex
> > -> hold device mutex in
> > ib_register_device
> > 					-> try acquiring rtnl_mutex in
> > 					   ib_enum_roce_netdev()
> > 
> > Current patch schedules the ib_register_device() functionality of
> > iw_cxgb4 to a workqueue to prevent the possible cross-locking.
> > Also rename the labels in c4iw_reister_device().
> > 
> > Signed-off-by: Potnuri Bharat Teja <bharat@xxxxxxxxxxx>
> 
> Reviewed-by: Steve Wise <swise@xxxxxxxxxxxxxxxxxxxxx>
> 
> 

Thanks, applied.

-- 
Doug Ledford <dledford@xxxxxxxxxx>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux