]> git.baikalelectronics.ru Git - kernel.git/commit
ice: avoid bonding causing auxiliary plug/unplug under RTNL lock
authorDave Ertman <david.m.ertman@intel.com>
Fri, 10 Mar 2023 19:48:33 +0000 (11:48 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Mar 2023 12:34:02 +0000 (13:34 +0100)
commit2b9aa3cefae96df48faf9c59595ef576f841d9f2
tree3ceec527e864e45bf852081ba6c42da8f1dc12c4
parent6b0b9a5c54da9ef02d100006ddea8c63dcea8aa3
ice: avoid bonding causing auxiliary plug/unplug under RTNL lock

commit c50a354bc514f6bb10df0daefc9856989157e05c upstream.

RDMA is not supported in ice on a PF that has been added to a bonded
interface. To enforce this, when an interface enters a bond, we unplug
the auxiliary device that supports RDMA functionality.  This unplug
currently happens in the context of handling the netdev bonding event.
This event is sent to the ice driver under RTNL context.  This is causing
a deadlock where the RDMA driver is waiting for the RTNL lock to complete
the removal.

Defer the unplugging/re-plugging of the auxiliary device to the service
task so that it is not performed under the RTNL lock context.

Cc: stable@vger.kernel.org # 6.1.x
Reported-by: Jaroslav Pulchart <jaroslav.pulchart@gooddata.com>
Link: https://lore.kernel.org/netdev/CAK8fFZ6A_Gphw_3-QMGKEFQk=sfCw1Qmq0TVZK3rtAi7vb621A@mail.gmail.com/
Fixes: a276ea96090c ("ice: Fix race condition during interface enslave")
Fixes: 91e1f22ab3c9 ("RDMA/irdma: Report the correct link speed")
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Tested-by: Arpana Arland <arpanax.arland@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Link: https://lore.kernel.org/r/20230310194833.3074601-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/intel/ice/ice.h
drivers/net/ethernet/intel/ice/ice_main.c