Skip to content

Commit

Permalink
sfc: fix race in efx_enqueue_skb_tso()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Nov 30, 2011
1 parent e983190 commit 449fa02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/sfc/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1173,11 +1173,11 @@ static int efx_enqueue_skb_tso(struct efx_tx_queue *tx_queue,
goto mem_err;
}

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

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

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

tx_queue->tso_bursts++;
return NETDEV_TX_OK;

Expand Down

0 comments on commit 449fa02

Please sign in to comment.