diff options
author | Patrick McHardy <kaber@trash.net> | 2009-06-11 23:17:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-13 04:18:34 -0400 |
commit | 4bd73ae2682d9069746bb049a416d9ab90c6684b (patch) | |
tree | 06c1fa545e0fe2ee1e610db19fde49114b47f152 /drivers/net/irda/ksdazzle-sir.c | |
parent | 3790c8cdb99f23824b23cb16df608281b335ee91 (diff) |
net: fix network drivers ndo_start_xmit() return values (part 2)
Fix up IRDA drivers that return an errno value to qdisc_restart(), causing
qdisc_restart() to print a warning an requeue/retransmit the skb.
- donauboe: intention appears to be to have the skb retransmitted without
error message
- irda-usb: intention is to drop silently according to comment
- kingsub-sir: skb is freed: use after free
- ks959-sir: skb is freed: use after free
- ksdazzle-sir: skb is freed: use after free
- mcs7880: skb is freed: use after free
All but donauboe compile tested.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/irda/ksdazzle-sir.c')
-rw-r--r-- | drivers/net/irda/ksdazzle-sir.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/irda/ksdazzle-sir.c b/drivers/net/irda/ksdazzle-sir.c index 64df27f2bfd4..1ef45ec74422 100644 --- a/drivers/net/irda/ksdazzle-sir.c +++ b/drivers/net/irda/ksdazzle-sir.c | |||
@@ -304,9 +304,6 @@ static int ksdazzle_hard_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
304 | unsigned int wraplen; | 304 | unsigned int wraplen; |
305 | int ret = 0; | 305 | int ret = 0; |
306 | 306 | ||
307 | if (skb == NULL || netdev == NULL) | ||
308 | return -EINVAL; | ||
309 | |||
310 | netif_stop_queue(netdev); | 307 | netif_stop_queue(netdev); |
311 | 308 | ||
312 | /* the IRDA wrapping routines don't deal with non linear skb */ | 309 | /* the IRDA wrapping routines don't deal with non linear skb */ |
@@ -341,7 +338,7 @@ static int ksdazzle_hard_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
341 | dev_kfree_skb(skb); | 338 | dev_kfree_skb(skb); |
342 | spin_unlock(&kingsun->lock); | 339 | spin_unlock(&kingsun->lock); |
343 | 340 | ||
344 | return ret; | 341 | return NETDEV_TX_OK; |
345 | } | 342 | } |
346 | 343 | ||
347 | /* Receive callback function */ | 344 | /* Receive callback function */ |