diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-11-30 17:12:27 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-30 17:12:27 -0500 |
commit | 449fa023bca5b53bd924d91a27ffd34807fdeb80 (patch) | |
tree | 196813959c3c790a8eb2e06281e78fd316930b63 /drivers/net/ethernet/sfc | |
parent | e98319098885859e34c23cc8a130b6b8668a6abe (diff) |
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>
Diffstat (limited to 'drivers/net/ethernet/sfc')
-rw-r--r-- | drivers/net/ethernet/sfc/tx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sfc/tx.c b/drivers/net/ethernet/sfc/tx.c index ab4c6357002..e0e00b3d6a8 100644 --- a/drivers/net/ethernet/sfc/tx.c +++ b/drivers/net/ethernet/sfc/tx.c | |||
@@ -1173,11 +1173,11 @@ static int efx_enqueue_skb_tso(struct efx_tx_queue *tx_queue, | |||
1173 | goto mem_err; | 1173 | goto mem_err; |
1174 | } | 1174 | } |
1175 | 1175 | ||
1176 | netdev_tx_sent_queue(tx_queue->core_txq, skb->len); | ||
1177 | |||
1176 | /* Pass off to hardware */ | 1178 | /* Pass off to hardware */ |
1177 | efx_nic_push_buffers(tx_queue); | 1179 | efx_nic_push_buffers(tx_queue); |
1178 | 1180 | ||
1179 | netdev_tx_sent_queue(tx_queue->core_txq, skb->len); | ||
1180 | |||
1181 | tx_queue->tso_bursts++; | 1181 | tx_queue->tso_bursts++; |
1182 | return NETDEV_TX_OK; | 1182 | return NETDEV_TX_OK; |
1183 | 1183 | ||