From: Patrick McHardy Date: Sat, 29 Oct 2005 12:31:39 +0000 (+0100) Subject: [PATCH] prism54: Free skb after disabling interrupts X-Git-Tag: v2.6.15-rc1~731^2~3^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e71180f3689e00c5a1095925352a72dacdd62e34;p=linux-2.6 [PATCH] prism54: Free skb after disabling interrupts The dev_kfree_skb in islpci_eth_transmit happens while irqs are still disabled, so either dev_kfree_skb_irq needs to be used or the skb needs to be freed after irqs have been enabled again. This patch should fix it. Signed-off-by: Patrick McHardy Signed-off-by: Daniel Drake Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/wireless/prism54/islpci_eth.c b/drivers/net/wireless/prism54/islpci_eth.c index 0975dd4ed7..3b49efa37e 100644 --- a/drivers/net/wireless/prism54/islpci_eth.c +++ b/drivers/net/wireless/prism54/islpci_eth.c @@ -241,12 +241,10 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev) return 0; drop_free: - /* free the skbuf structure before aborting */ - dev_kfree_skb(skb); - skb = NULL; - priv->statistics.tx_dropped++; spin_unlock_irqrestore(&priv->slock, flags); + dev_kfree_skb(skb); + skb = NULL; return err; }