]> git.baikalelectronics.ru Git - kernel.git/commit
ice: Avoid RTNL lock when re-creating auxiliary device
authorDave Ertman <david.m.ertman@intel.com>
Fri, 21 Jan 2022 00:27:56 +0000 (16:27 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 10 Feb 2022 16:47:27 +0000 (08:47 -0800)
commit5dbbbd01cbba831233c6ea9a3e6bfa133606d3c0
treef9078817e95ffddce1077dc3cdeae3ac102332a8
parentbea1898f65b9b7096cb4e73e97c83b94718f1fa1
ice: Avoid RTNL lock when re-creating auxiliary device

If a call to re-create the auxiliary device happens in a context that has
already taken the RTNL lock, then the call flow that recreates auxiliary
device can hang if there is another attempt to claim the RTNL lock by the
auxiliary driver.

To avoid this, any call to re-create auxiliary devices that comes from
an source that is holding the RTNL lock (e.g. netdev notifier when
interface exits a bond) should execute in a separate thread.  To
accomplish this, add a flag to the PF that will be evaluated in the
service task and dealt with there.

Fixes: f9f5301e7e2d ("ice: Register auxiliary device to provide RDMA")
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Reviewed-by: Jonathan Toppins <jtoppins@redhat.com>
Tested-by: Gurucharan G <gurucharanx.g@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice.h
drivers/net/ethernet/intel/ice/ice_main.c