aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/skbuff.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-03-29 14:46:52 -0400
committerDavid S. Miller <davem@davemloft.net>2007-03-29 14:46:52 -0400
commitc01003c20563d1e75ec9828d21743919d2b43977 (patch)
tree21cae8933e8a4908d8e8c24244a627bf0c997e77 /net/core/skbuff.c
parentdb8b22550d4b83f0910d27a34d05aa16f7f7159f (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/core/skbuff.c')
-rw-r--r--net/core/skbuff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 702fa8f08747..87573ae35b02 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -496,7 +496,7 @@ struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t gfp_mask)
496 n->tc_verd = SET_TC_VERD(skb->tc_verd,0); 496 n->tc_verd = SET_TC_VERD(skb->tc_verd,0);
497 n->tc_verd = CLR_TC_OK2MUNGE(n->tc_verd); 497 n->tc_verd = CLR_TC_OK2MUNGE(n->tc_verd);
498 n->tc_verd = CLR_TC_MUNGED(n->tc_verd); 498 n->tc_verd = CLR_TC_MUNGED(n->tc_verd);
499 C(input_dev); 499 C(iif);
500#endif 500#endif
501 skb_copy_secmark(n, skb); 501 skb_copy_secmark(n, skb);
502#endif 502#endif