diff options
author | Patrick McHardy <kaber@trash.net> | 2007-03-29 14:46:52 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-03-29 14:46:52 -0400 |
commit | c01003c20563d1e75ec9828d21743919d2b43977 (patch) | |
tree | 21cae8933e8a4908d8e8c24244a627bf0c997e77 /net/sched/act_mirred.c | |
parent | db8b22550d4b83f0910d27a34d05aa16f7f7159f (diff) |
[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>
Diffstat (limited to 'net/sched/act_mirred.c')
-rw-r--r-- | net/sched/act_mirred.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c index 68f26cb278f9..3e93683e9ab3 100644 --- a/net/sched/act_mirred.c +++ b/net/sched/act_mirred.c | |||
@@ -198,7 +198,7 @@ bad_mirred: | |||
198 | skb2->tc_verd = SET_TC_FROM(skb2->tc_verd, at); | 198 | skb2->tc_verd = SET_TC_FROM(skb2->tc_verd, at); |
199 | 199 | ||
200 | skb2->dev = dev; | 200 | skb2->dev = dev; |
201 | skb2->input_dev = skb->dev; | 201 | skb2->iif = skb->dev->ifindex; |
202 | dev_queue_xmit(skb2); | 202 | dev_queue_xmit(skb2); |
203 | spin_unlock(&m->tcf_lock); | 203 | spin_unlock(&m->tcf_lock); |
204 | return m->tcf_action; | 204 | return m->tcf_action; |