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/donauboe.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/donauboe.c')
-rw-r--r-- | drivers/net/irda/donauboe.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c index 6b6548b9fda0..9a0346e751ac 100644 --- a/drivers/net/irda/donauboe.c +++ b/drivers/net/irda/donauboe.c | |||
@@ -994,11 +994,11 @@ toshoboe_hard_xmit (struct sk_buff *skb, struct net_device *dev) | |||
994 | 994 | ||
995 | /* change speed pending, wait for its execution */ | 995 | /* change speed pending, wait for its execution */ |
996 | if (self->new_speed) | 996 | if (self->new_speed) |
997 | return -EBUSY; | 997 | return NETDEV_TX_BUSY; |
998 | 998 | ||
999 | /* device stopped (apm) wait for restart */ | 999 | /* device stopped (apm) wait for restart */ |
1000 | if (self->stopped) | 1000 | if (self->stopped) |
1001 | return -EBUSY; | 1001 | return NETDEV_TX_BUSY; |
1002 | 1002 | ||
1003 | toshoboe_checkstuck (self); | 1003 | toshoboe_checkstuck (self); |
1004 | 1004 | ||
@@ -1049,7 +1049,7 @@ toshoboe_hard_xmit (struct sk_buff *skb, struct net_device *dev) | |||
1049 | if (self->txpending) | 1049 | if (self->txpending) |
1050 | { | 1050 | { |
1051 | spin_unlock_irqrestore(&self->spinlock, flags); | 1051 | spin_unlock_irqrestore(&self->spinlock, flags); |
1052 | return -EBUSY; | 1052 | return NETDEV_TX_BUSY; |
1053 | } | 1053 | } |
1054 | 1054 | ||
1055 | /* If in SIR mode we need to generate a string of XBOFs */ | 1055 | /* If in SIR mode we need to generate a string of XBOFs */ |
@@ -1105,7 +1105,7 @@ dumpbufs(skb->data,skb->len,'>'); | |||
1105 | ,skb->len, self->ring->tx[self->txs].control, self->txpending); | 1105 | ,skb->len, self->ring->tx[self->txs].control, self->txpending); |
1106 | toshoboe_start_DMA(self, OBOE_CONFIG0H_ENTX); | 1106 | toshoboe_start_DMA(self, OBOE_CONFIG0H_ENTX); |
1107 | spin_unlock_irqrestore(&self->spinlock, flags); | 1107 | spin_unlock_irqrestore(&self->spinlock, flags); |
1108 | return -EBUSY; | 1108 | return NETDEV_TX_BUSY; |
1109 | } | 1109 | } |
1110 | 1110 | ||
1111 | if (INB (OBOE_ENABLEH) & OBOE_ENABLEH_SIRON) | 1111 | if (INB (OBOE_ENABLEH) & OBOE_ENABLEH_SIRON) |