mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 18:39:59 +00:00
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: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e983190988
commit
449fa023bc
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue