Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 51bf6bb4 authored by Michael Chan's avatar Michael Chan Committed by David S. Miller
Browse files

bnx2: Protect tx timeout reset with rtnl_lock().



To prevent race conditions with other reset events.

Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cceea982
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -6263,8 +6263,11 @@ bnx2_reset_task(struct work_struct *work)
{
	struct bnx2 *bp = container_of(work, struct bnx2, reset_task);

	if (!netif_running(bp->dev))
	rtnl_lock();
	if (!netif_running(bp->dev)) {
		rtnl_unlock();
		return;
	}

	bnx2_netif_stop(bp);

@@ -6272,6 +6275,7 @@ bnx2_reset_task(struct work_struct *work)

	atomic_set(&bp->intr_sem, 1);
	bnx2_netif_start(bp);
	rtnl_unlock();
}

static void