]> 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)
commit3b5de044e6d2b32c539890ad6bf4b7a023422436
treef9078817e95ffddce1077dc3cdeae3ac102332a8
parent35996cc7efca0d2814a2bc62bb32b5af3f93484a
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: dfd6ba335c7f ("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