Skip to content

Commit ff35a1f

Browse files
committed
iavf: Fix a locking bug in an error path
JIRA: https://issues.redhat.com/browse/RHEL-87382 commit e589adf Author: Bart Van Assche <bvanassche@acm.org> Date: Thu Feb 6 09:51:08 2025 -0800 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 <bvanassche@acm.org> Link: https://patch.msgid.link/20250206175114.1974171-28-bvanassche@acm.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Mohammad Heib <mheib@redhat.com>
1 parent 39013a2 commit ff35a1f

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
@@ -3083,8 +3083,8 @@ static void iavf_watchdog_task(struct work_struct *work)
30833083
}
30843084

30853085
mutex_unlock(&adapter->crit_lock);
3086-
netdev_unlock(netdev);
30873086
restart_watchdog:
3087+
netdev_unlock(netdev);
30883088
if (adapter->state >= __IAVF_DOWN)
30893089
queue_work(adapter->wq, &adapter->adminq_task);
30903090
if (adapter->aq_required)

0 commit comments

Comments
 (0)