projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ad2475
)
pxa168_eth: fix race in transmit path.
author
Richard Cochran
<
[email protected]
>
Sun, 19 Jun 2011 21:48:06 +0000
(21:48 +0000)
committer
David S. Miller
<
[email protected]
>
Mon, 20 Jun 2011 21:02:07 +0000
(14:02 -0700)
Because the socket buffer is freed in the completion interrupt, it is not
safe to access it after submitting it to the hardware.
Cc:
[email protected]
Cc: Sachin Sanap <
[email protected]
>
Cc: Zhangfei Gao <
[email protected]
>
Cc: Philip Rakity <
[email protected]
>
Signed-off-by: Richard Cochran <
[email protected]
>
Acked-by: Eric Dumazet <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/pxa168_eth.c
patch
|
blob
|
history
diff --git
a/drivers/net/pxa168_eth.c
b/drivers/net/pxa168_eth.c
index 89f7540d90f909708fa318dbe9ecf6458252a922..5f597ca592bb8bf94a80861de3d315bc1b3c2026 100644
(file)
--- 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) {