]> 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)
commit82c7c746e95c8ca7e7c3d2f2a70d486578fd21df
treef9078817e95ffddce1077dc3cdeae3ac102332a8
parentb88b0b70a878e24b9c5a0d2fe46f5d456bd97116
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: 142c9cadb44c ("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