1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/intel/iavf
Ivan Vecera aa626da947 iavf: Detach device during reset task
iavf_reset_task() takes crit_lock at the beginning and holds
it during whole call. The function subsequently calls
iavf_init_interrupt_scheme() that grabs RTNL. Problem occurs
when userspace initiates during the reset task any ndo callback
that runs under RTNL like iavf_open() because some of that
functions tries to take crit_lock. This leads to classic A-B B-A
deadlock scenario.

To resolve this situation the device should be detached in
iavf_reset_task() prior taking crit_lock to avoid subsequent
ndos running under RTNL and reattach the device at the end.

Fixes: 62fe2a865e ("i40evf: add missing rtnl_lock() around i40evf_set_interrupt_capability")
Cc: Jacob Keller <jacob.e.keller@intel.com>
Cc: Patryk Piotrowski <patryk.piotrowski@intel.com>
Cc: SlawomirX Laba <slawomirx.laba@intel.com>
Tested-by: Vitaly Grinberg <vgrinber@redhat.com>
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2022-09-02 11:17:02 -07:00
..
iavf.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-08-03 09:04:55 +02:00
iavf_adminq.c iavf: Fix adminq error handling 2022-08-12 08:22:55 -07:00
iavf_adminq.h intel-ethernet: clean up W=1 warnings in kdoc 2020-09-25 16:28:59 -07:00
iavf_adminq_cmd.h iavf: replace i40e variables with iavf 2019-05-31 01:02:53 -07:00
iavf_adv_rss.c iavf: Support for modifying SCTP RSS flow hashing 2021-04-22 09:26:23 -07:00
iavf_adv_rss.h iavf: Support for modifying SCTP RSS flow hashing 2021-04-22 09:26:23 -07:00
iavf_alloc.h iavf: change iavf_status_code to iavf_status 2019-05-31 00:19:33 -07:00
iavf_client.c iavf: update comments and file checks to match iavf 2019-05-31 01:03:24 -07:00
iavf_client.h iavf: rename iavf_client.h defines to match driver name 2019-05-31 01:03:13 -07:00
iavf_common.c iavf: Remove non-inclusive language 2022-03-01 08:50:11 -08:00
iavf_devids.h
iavf_ethtool.c iavf: Disallow changing rx/tx-frames and rx/tx-frames-irq 2022-07-18 09:36:40 -07:00
iavf_fdir.c iavf: redefine the magic number for FDIR GTP-U header fields 2021-04-23 09:34:19 -07:00
iavf_fdir.h iavf: change the flex-byte support number to macro definition 2021-04-23 09:03:56 -07:00
iavf_main.c iavf: Detach device during reset task 2022-09-02 11:17:02 -07:00
iavf_osdep.h iavf: Fix up debug print macro 2019-06-28 15:59:56 -07:00
iavf_prototype.h iavf: replace i40e variables with iavf 2019-05-31 01:02:53 -07:00
iavf_register.h
iavf_status.h iavf: Remove non-inclusive language 2022-03-01 08:50:11 -08:00
iavf_trace.h intel-ethernet: clean up W=1 warnings in kdoc 2020-09-25 16:28:59 -07:00
iavf_txrx.c iavf: Fix handling of dummy receive descriptors 2022-07-18 09:36:40 -07:00
iavf_txrx.h iavf: Add support for VIRTCHNL_VF_OFFLOAD_VLAN_V2 hotpath 2021-12-17 12:37:19 -08:00
iavf_type.h iavf: clean up packet type lookup table 2021-06-18 09:04:44 -07:00
iavf_virtchnl.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-07-21 13:03:39 -07:00
Makefile iavf: Support for modifying TCP RSS flow hashing 2021-04-22 09:26:23 -07:00