* net: fix network drivers ndo_start_xmit() return values (part 6)
@ 2009-06-12 15:20 Patrick McHardy
0 siblings, 0 replies; only message in thread
From: Patrick McHardy @ 2009-06-12 15:20 UTC (permalink / raw)
To: David S. Miller; +Cc: Linux Netdev List
[-- Attachment #1: Type: text/plain, Size: 59 bytes --]
A single hamradio driver that appears to be unmaintained.
[-- Attachment #2: 06.diff --]
[-- Type: text/x-patch, Size: 1240 bytes --]
commit 2a3f9e1eb41a809168916bd70d3c24707d89a34b
Author: Patrick McHardy <kaber@trash.net>
Date: Fri Jun 12 17:19:15 2009 +0200
net: fix network drivers ndo_start_xmit() return values (part 6)
Fix up hamradio drivers that return an errno value to dev_queue_xmit(), causing
it to print a warning an free the skb.
- bpqether: skb is freed: use after free
Compile tested only.
Signed-off-by: Patrick McHardy <kaber@trash.net>
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c
index d509b37..5105548 100644
--- a/drivers/net/hamradio/bpqether.c
+++ b/drivers/net/hamradio/bpqether.c
@@ -274,7 +274,7 @@ static int bpq_xmit(struct sk_buff *skb, struct net_device *dev)
if ((newskb = skb_realloc_headroom(skb, AX25_BPQ_HEADER_LEN)) == NULL) {
printk(KERN_WARNING "bpqether: out of memory\n");
kfree_skb(skb);
- return -ENOMEM;
+ return NETDEV_TX_OK;
}
if (skb->sk != NULL)
@@ -294,7 +294,7 @@ static int bpq_xmit(struct sk_buff *skb, struct net_device *dev)
if ((dev = bpq_get_ether_dev(dev)) == NULL) {
dev->stats.tx_dropped++;
kfree_skb(skb);
- return -ENODEV;
+ return NETDEV_TX_OK;
}
skb->protocol = ax25_type_trans(skb, dev);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-06-12 15:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-12 15:20 net: fix network drivers ndo_start_xmit() return values (part 6) Patrick McHardy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.