diff options
author | 2025-02-06 09:51:08 -0800 | |
---|---|---|
committer | 2025-02-11 18:02:04 -0800 | |
commit | e589adf5b70c07b1ab974d077046fdbf583b2f36 (patch) | |
tree | 6e115238688744b8764078955a823ab347156f91 | |
parent | rxrpc: Fix alteration of headers whilst zerocopy pending (diff) | |
download | wireguard-linux-e589adf5b70c07b1ab974d077046fdbf583b2f36.tar.xz wireguard-linux-e589adf5b70c07b1ab974d077046fdbf583b2f36.zip |
iavf: Fix a locking bug in an error path
If the netdev lock has been obtained, unlock it before returning.
This bug has been detected by the Clang thread-safety analyzer.
Fixes: afc664987ab3 ("eth: iavf: extend the netdev_lock usage")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20250206175114.1974171-28-bvanassche@acm.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | drivers/net/ethernet/intel/iavf/iavf_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c index 2d7a18fcc3be..852e5b62f0a5 100644 --- a/drivers/net/ethernet/intel/iavf/iavf_main.c +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c @@ -2903,8 +2903,8 @@ static void iavf_watchdog_task(struct work_struct *work) } mutex_unlock(&adapter->crit_lock); - netdev_unlock(netdev); restart_watchdog: + netdev_unlock(netdev); if (adapter->state >= __IAVF_DOWN) queue_work(adapter->wq, &adapter->adminq_task); if (adapter->aq_required) |