linux/drivers/net/ethernet/intel/ixgbe
Jedrzej Jagielski 316ba68175 ixgbe: destroy aci.lock later within ixgbe_remove path
There's another issue with aci.lock and previous patch uncovers it.
aci.lock is being destroyed during removing ixgbe while some of the
ixgbe closing routines are still ongoing. These routines use Admin
Command Interface which require taking aci.lock which has been already
destroyed what leads to call trace.

[  +0.000004] DEBUG_LOCKS_WARN_ON(lock->magic != lock)
[  +0.000007] WARNING: CPU: 12 PID: 10277 at kernel/locking/mutex.c:155 mutex_lock+0x5f/0x70
[  +0.000002] Call Trace:
[  +0.000003]  <TASK>
[  +0.000006]  ixgbe_aci_send_cmd+0xc8/0x220 [ixgbe]
[  +0.000049]  ? try_to_wake_up+0x29d/0x5d0
[  +0.000009]  ixgbe_disable_rx_e610+0xc4/0x110 [ixgbe]
[  +0.000032]  ixgbe_disable_rx+0x3d/0x200 [ixgbe]
[  +0.000027]  ixgbe_down+0x102/0x3b0 [ixgbe]
[  +0.000031]  ixgbe_close_suspend+0x28/0x90 [ixgbe]
[  +0.000028]  ixgbe_close+0xfb/0x100 [ixgbe]
[  +0.000025]  __dev_close_many+0xae/0x220
[  +0.000005]  dev_close_many+0xc2/0x1a0
[  +0.000004]  ? kernfs_should_drain_open_files+0x2a/0x40
[  +0.000005]  unregister_netdevice_many_notify+0x204/0xb00
[  +0.000006]  ? __kernfs_remove.part.0+0x109/0x210
[  +0.000006]  ? kobj_kset_leave+0x4b/0x70
[  +0.000008]  unregister_netdevice_queue+0xf6/0x130
[  +0.000006]  unregister_netdev+0x1c/0x40
[  +0.000005]  ixgbe_remove+0x216/0x290 [ixgbe]
[  +0.000021]  pci_device_remove+0x42/0xb0
[  +0.000007]  device_release_driver_internal+0x19c/0x200
[  +0.000008]  driver_detach+0x48/0x90
[  +0.000003]  bus_remove_driver+0x6d/0xf0
[  +0.000006]  pci_unregister_driver+0x2e/0xb0
[  +0.000005]  ixgbe_exit_module+0x1c/0xc80 [ixgbe]

Same as for the previous commit, the issue has been highlighted by the
commit 337369f8ce ("locking/mutex: Add MUTEX_WARN_ON() into fast path").

Move destroying aci.lock to the end of ixgbe_remove(), as this
simply fixes the issue.

Fixes: 4600cdf9f5 ("ixgbe: Enable link management in E610 device")
Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2025-09-16 14:01:53 -07:00
..
devlink ixgbe: prevent from unwanted interface name changes 2025-08-12 13:24:09 -07:00
Makefile ixgbe: devlink: add devlink region support for E610 2025-04-29 15:13:44 -07:00
ixgbe.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-07-17 11:00:33 -07:00
ixgbe_82598.c ixgbe: spelling corrections 2025-07-03 09:39:04 -07:00
ixgbe_82599.c ixgbe: add E610 functions getting PBA and FW ver info 2025-04-15 07:36:32 -07:00
ixgbe_common.c ixgbe: spelling corrections 2025-07-03 09:39:04 -07:00
ixgbe_common.h ixgbe: downgrade logging of unsupported VF API version to debug 2024-12-03 10:11:53 -08:00
ixgbe_dcb.c
ixgbe_dcb.h
ixgbe_dcb_82598.c
ixgbe_dcb_82598.h
ixgbe_dcb_82599.c
ixgbe_dcb_82599.h
ixgbe_dcb_nl.c ixgbe: wrap netdev_priv() usage 2025-04-15 07:36:32 -07:00
ixgbe_debugfs.c
ixgbe_e610.c ixgbe: fix ixgbe_orom_civd_info struct layout 2025-08-25 09:45:23 -07:00
ixgbe_e610.h ixgbe: use libie adminq descriptors 2025-07-24 09:25:03 -07:00
ixgbe_ethtool.c ixgbe: fix incorrect map used in eee linkmode 2025-09-02 11:08:59 -07:00
ixgbe_fcoe.c ixgbe: spelling corrections 2025-07-03 09:39:04 -07:00
ixgbe_fcoe.h
ixgbe_fw_update.c ixgbe: use libie adminq descriptors 2025-07-24 09:25:03 -07:00
ixgbe_fw_update.h ixgbe: add device flash update via devlink 2025-04-15 07:36:32 -07:00
ixgbe_ipsec.c ipsec-next-2025-05-23 2025-05-26 18:32:48 +02:00
ixgbe_ipsec.h
ixgbe_lib.c ixgbe: spelling corrections 2025-07-03 09:39:04 -07:00
ixgbe_main.c ixgbe: destroy aci.lock later within ixgbe_remove path 2025-09-16 14:01:53 -07:00
ixgbe_mbx.c ixgbe: Enable link management in E610 device 2024-12-20 10:14:03 -08:00
ixgbe_mbx.h ixgbe: spelling corrections 2025-07-03 09:39:04 -07:00
ixgbe_model.h
ixgbe_phy.c ixgbe: spelling corrections 2025-07-03 09:39:04 -07:00
ixgbe_phy.h ixgbe: Correct BASE-BX10 compliance code 2024-12-03 10:11:53 -08:00
ixgbe_ptp.c Networking changes for 6.17. 2025-07-30 08:58:55 -07:00
ixgbe_sriov.c ixgbe: spelling corrections 2025-07-03 09:39:04 -07:00
ixgbe_sriov.h ixgbe: check for MDD events 2025-07-03 09:39:03 -07:00
ixgbe_sysfs.c
ixgbe_txrx_common.h ixgbe: pull out stats update to common routines 2024-03-06 09:32:58 -08:00
ixgbe_type.h ixgbe: spelling corrections 2025-07-03 09:39:04 -07:00
ixgbe_type_e610.h ixgbe: fix ixgbe_orom_civd_info struct layout 2025-08-25 09:45:23 -07:00
ixgbe_x540.c ixgbe: spelling corrections 2025-07-03 09:39:04 -07:00
ixgbe_x540.h ixgbe: Add ixgbe_x540 multiple header inclusion protection 2024-12-20 10:14:02 -08:00
ixgbe_x550.c ixgbe: spelling corrections 2025-07-03 09:39:04 -07:00
ixgbe_x550.h ixgbe: add MDD support 2025-07-03 09:39:03 -07:00
ixgbe_xsk.c ixgbe: xsk: resolve the negative overflow of budget in ixgbe_xmit_zc 2025-08-20 18:46:30 -07:00