[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <180237f9f567de29068e51b1442629509bb03e43.1308555865.git.richard.cochran@omicron.at>
Date: Mon, 20 Jun 2011 09:48:06 +0200
From: Richard Cochran <richardcochran@...il.com>
To: <netdev@...r.kernel.org>
Cc: David Miller <davem@...emloft.net>,
Eric Dumazet <eric.dumazet@...il.com>, stable@...nel.org,
Sachin Sanap <ssanap@...vell.com>,
Zhangfei Gao <zgao6@...vell.com>,
Philip Rakity <prakity@...vell.com>
Subject: [PATCH 1/2] 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@...nel.org
Cc: Sachin Sanap <ssanap@...vell.com>
Cc: Zhangfei Gao <zgao6@...vell.com>
Cc: Philip Rakity <prakity@...vell.com>
Signed-off-by: Richard Cochran <richard.cochran@...cron.at>
---
drivers/net/pxa168_eth.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/pxa168_eth.c b/drivers/net/pxa168_eth.c
index 89f7540..5f597ca 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)
wmb();
wrl(pep, SDMA_CMD, SDMA_CMD_TXDH | SDMA_CMD_ERD);
- stats->tx_bytes += skb->len;
+ stats->tx_bytes += length;
stats->tx_packets++;
dev->trans_start = jiffies;
if (pep->tx_ring_size - pep->tx_desc_count <= 1) {
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists