]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
spidernet: null out skb pointer after its been used.
authorLinas Vepstas <linas@austin.ibm.com>
Mon, 11 Jun 2007 18:17:02 +0000 (13:17 -0500)
committerJeff Garzik <jeff@garzik.org>
Wed, 20 Jun 2007 23:09:32 +0000 (19:09 -0400)
Avoid kernel crash in mm/slab.c due to double-free of pointer.

If the ethernet interface is brought down while there is still
RX traffic in flight, the device shutdown routine can end up
trying to double-free an skb, leading to a crash in mm/slab.c
Avoid the double-free by nulling out the skb pointer.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/spider_net.c

index b47ad1df2e0cd8c6cafe7d4e51a00cfa27945013..69005d113d4d9fe9463c2ab860c2019ad3862de1 100644 (file)
@@ -1131,6 +1131,7 @@ spider_net_decode_one_descr(struct spider_net_card *card)
 
        /* Ok, we've got a packet in descr */
        spider_net_pass_skb_up(descr, card);
+       descr->skb = NULL;
        hwdescr->dmac_cmd_status = SPIDER_NET_DESCR_NOT_IN_USE;
        return 1;