diff options
author | Linas Vepstas <linas@austin.ibm.com> | 2007-06-11 14:17:02 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-06-20 19:09:32 -0400 |
commit | 83d35145c443d8394aaf1743301e79fa0a8054d7 (patch) | |
tree | 4a4fe97485e1690eb43212cb3afda93acc5edc62 | |
parent | d025d7858f7415f558e89d870ad1a205954b64cd (diff) |
spidernet: null out skb pointer after its been used.
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>
-rw-r--r-- | drivers/net/spider_net.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index b47ad1df2e0c..69005d113d4d 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c | |||
@@ -1131,6 +1131,7 @@ spider_net_decode_one_descr(struct spider_net_card *card) | |||
1131 | 1131 | ||
1132 | /* Ok, we've got a packet in descr */ | 1132 | /* Ok, we've got a packet in descr */ |
1133 | spider_net_pass_skb_up(descr, card); | 1133 | spider_net_pass_skb_up(descr, card); |
1134 | descr->skb = NULL; | ||
1134 | hwdescr->dmac_cmd_status = SPIDER_NET_DESCR_NOT_IN_USE; | 1135 | hwdescr->dmac_cmd_status = SPIDER_NET_DESCR_NOT_IN_USE; |
1135 | return 1; | 1136 | return 1; |
1136 | 1137 | ||