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:
34d101d
)
NET: pch, fix use after free
author
Jiri Slaby
<
[email protected]
>
Sun, 10 Oct 2010 23:26:56 +0000
(23:26 +0000)
committer
David S. Miller
<
[email protected]
>
Mon, 11 Oct 2010 18:13:59 +0000
(11:13 -0700)
Stanse found that pch_gbe_xmit_frame uses skb after it is freed. Fix
that.
Signed-off-by: Jiri Slaby <
[email protected]
>
Cc: Masayuki Ohtake <
[email protected]
>
Acked-by: Eric Dumazet <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/pch_gbe/pch_gbe_main.c
patch
|
blob
|
history
diff --git
a/drivers/net/pch_gbe/pch_gbe_main.c
b/drivers/net/pch_gbe/pch_gbe_main.c
index 53c56cf8aca2bf276fbefc8db1db5a520a8d6c8a..e44644f169fd2b0e7e8198def7402e436bac8850 100644
(file)
--- a/
drivers/net/pch_gbe/pch_gbe_main.c
+++ b/
drivers/net/pch_gbe/pch_gbe_main.c
@@
-1847,9
+1847,9
@@
static int pch_gbe_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
unsigned long flags;
if (unlikely(skb->len > (adapter->hw.mac.max_frame_size - 4))) {
- dev_kfree_skb_any(skb);
pr_err("Transfer length Error: skb len: %d > max: %d\n",
skb->len, adapter->hw.mac.max_frame_size);
+ dev_kfree_skb_any(skb);
adapter->stats.tx_length_errors++;
return NETDEV_TX_OK;
}