mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-02 20:29:20 +00:00
[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>
This commit is contained in:
parent
db8b22550d
commit
c01003c205
6 changed files with 27 additions and 32 deletions
|
@ -198,7 +198,7 @@ bad_mirred:
|
|||
skb2->tc_verd = SET_TC_FROM(skb2->tc_verd, at);
|
||||
|
||||
skb2->dev = dev;
|
||||
skb2->input_dev = skb->dev;
|
||||
skb2->iif = skb->dev->ifindex;
|
||||
dev_queue_xmit(skb2);
|
||||
spin_unlock(&m->tcf_lock);
|
||||
return m->tcf_action;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue