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>
This commit is contained in:

committato da
David S. Miller

parent
3790c8cdb9
commit
4bd73ae268
@@ -824,10 +824,6 @@ static int mcs_hard_xmit(struct sk_buff *skb, struct net_device *ndev)
|
||||
int wraplen;
|
||||
int ret = 0;
|
||||
|
||||
|
||||
if (skb == NULL || ndev == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
netif_stop_queue(ndev);
|
||||
mcs = netdev_priv(ndev);
|
||||
|
||||
@@ -870,7 +866,7 @@ static int mcs_hard_xmit(struct sk_buff *skb, struct net_device *ndev)
|
||||
|
||||
dev_kfree_skb(skb);
|
||||
spin_unlock_irqrestore(&mcs->lock, flags);
|
||||
return ret;
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
static const struct net_device_ops mcs_netdev_ops = {
|
||||
|
Fai riferimento in un nuovo problema
Block a user