aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRichard Cochran <richardcochran@gmail.com>2011-06-19 17:48:06 -0400
committerDavid S. Miller <davem@davemloft.net>2011-06-20 17:02:07 -0400
commit384420409d9b5d4443940abace49363d26135412 (patch)
treec347e488ded1b6eb53168d52faa5f3e25c7acdc4 /drivers
parent8ad2475e3555346fbd738e77da12578b97d10505 (diff)
pxa168_eth: fix race in transmit path.
Because the socket buffer is freed in the completion interrupt, it is not safe to access it after submitting it to the hardware. Cc: stable@kernel.org Cc: Sachin Sanap <ssanap@marvell.com> Cc: Zhangfei Gao <zgao6@marvell.com> Cc: Philip Rakity <prakity@marvell.com> Signed-off-by: Richard Cochran <richard.cochran@omicron.at> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/pxa168_eth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/pxa168_eth.c b/drivers/net/pxa168_eth.c
index 89f7540d90f9..5f597ca592bb 100644
--- a/drivers/net/pxa168_eth.c
+++ b/drivers/net/pxa168_eth.c
@@ -1273,7 +1273,7 @@ static int pxa168_eth_start_xmit(struct sk_buff *skb, struct net_device *dev)
1273 wmb(); 1273 wmb();
1274 wrl(pep, SDMA_CMD, SDMA_CMD_TXDH | SDMA_CMD_ERD); 1274 wrl(pep, SDMA_CMD, SDMA_CMD_TXDH | SDMA_CMD_ERD);
1275 1275
1276 stats->tx_bytes += skb->len; 1276 stats->tx_bytes += length;
1277 stats->tx_packets++; 1277 stats->tx_packets++;
1278 dev->trans_start = jiffies; 1278 dev->trans_start = jiffies;
1279 if (pep->tx_ring_size - pep->tx_desc_count <= 1) { 1279 if (pep->tx_ring_size - pep->tx_desc_count <= 1) {