Skip to content

Commit

Permalink
spidernet: null out skb pointer after its been used.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Linas Vepstas authored and Jeff Garzik committed Jun 20, 2007
1 parent d025d78 commit 83d3514
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/spider_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 83d3514

Please sign in to comment.