Skip to content

Commit e589adf

Browse files
bvanasschekuba-moo
authored andcommitted
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: afc6649 ("eth: iavf: extend the netdev_lock usage") Signed-off-by: Bart Van Assche <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 06ea2c9 commit e589adf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/intel/iavf/iavf_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2903,8 +2903,8 @@ static void iavf_watchdog_task(struct work_struct *work)
29032903
}
29042904

29052905
mutex_unlock(&adapter->crit_lock);
2906-
netdev_unlock(netdev);
29072906
restart_watchdog:
2907+
netdev_unlock(netdev);
29082908
if (adapter->state >= __IAVF_DOWN)
29092909
queue_work(adapter->wq, &adapter->adminq_task);
29102910
if (adapter->aq_required)

0 commit comments

Comments
 (0)