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

Commit 449fa023 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

sfc: fix race in efx_enqueue_skb_tso()



As soon as skb is pushed to hardware, it can be completed and freed, so
we should not dereference skb anymore.

Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e9831909
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1173,11 +1173,11 @@ static int efx_enqueue_skb_tso(struct efx_tx_queue *tx_queue,
			goto mem_err;
			goto mem_err;
	}
	}


	netdev_tx_sent_queue(tx_queue->core_txq, skb->len);

	/* Pass off to hardware */
	/* Pass off to hardware */
	efx_nic_push_buffers(tx_queue);
	efx_nic_push_buffers(tx_queue);


	netdev_tx_sent_queue(tx_queue->core_txq, skb->len);

	tx_queue->tso_bursts++;
	tx_queue->tso_bursts++;
	return NETDEV_TX_OK;
	return NETDEV_TX_OK;