]> git.baikalelectronics.ru Git - kernel.git/commit
[IFB]: Fix crash on input device removal
authorPatrick McHardy <kaber@trash.net>
Thu, 29 Mar 2007 18:46:52 +0000 (11:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 29 Mar 2007 18:46:52 +0000 (11:46 -0700)
commit7f9ba604a5d67744ca3126dd1d73f4fd4f322514
tree21cae8933e8a4908d8e8c24244a627bf0c997e77
parenta239fc20af81057d7c6579e4a6c2a62a504f9d82
[IFB]: Fix crash on input device removal

The input_device pointer is not refcounted, which means the device may
disappear while packets are queued, causing a crash when ifb passes packets
with a stale skb->dev pointer to netif_rx().

Fix by storing the interface index instead and do a lookup where neccessary.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ifb.c
include/linux/skbuff.h
include/net/pkt_cls.h
net/core/dev.c
net/core/skbuff.c
net/sched/act_mirred.c