]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iavf: iavf_suspend(): take RTNL before netdev_lock()
authorPrzemek Kitszel <przemyslaw.kitszel@intel.com>
Fri, 4 Apr 2025 10:23:16 +0000 (12:23 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 3 Jun 2025 16:48:03 +0000 (09:48 -0700)
commitdba35a4bb4a3da5696f2a179b7d695dc3ea25fb8
tree389a6294ac9bc9e7cd1186ddbe36e53393afdf3f
parentb56bbaf8c9ffe02468f6ba8757668e95dda7e62c
iavf: iavf_suspend(): take RTNL before netdev_lock()

Fix an obvious violation of lock ordering.
Jakub's [1] added netdev_lock() call that is wrong ordered wrt RTNL,
but the Fixes tag points to crit_lock being wrongly placed (by lockdep
standards).

Actual reason we got it wrong is dated back to critical section managed by
pure flag checks, which is with us since the very beginning.

[1] afc664987ab3 ("eth: iavf: extend the netdev_lock usage")

Fixes: 5ac49f3c2702 ("iavf: use mutexes for locking of critical sections")
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/iavf/iavf_main.c