[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>
Showing
- drivers/net/ifb.c 13 additions, 22 deletionsdrivers/net/ifb.c
- include/linux/skbuff.h 3 additions, 2 deletionsinclude/linux/skbuff.h
- include/net/pkt_cls.h 5 additions, 2 deletionsinclude/net/pkt_cls.h
- net/core/dev.c 4 additions, 4 deletionsnet/core/dev.c
- net/core/skbuff.c 1 addition, 1 deletionnet/core/skbuff.c
- net/sched/act_mirred.c 1 addition, 1 deletionnet/sched/act_mirred.c
Loading
Please register or sign in to comment