* [PATCH] xt_tee: use skb_dst_drop()
@ 2010-05-28 9:24 Eric Dumazet
2010-05-28 10:41 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2010-05-28 9:24 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Jan Engelhardt
After commit 7fee226a (net: add a noref bit on skb dst), its wrong to
use : dst_release(skb_dst(skb)), since we could decrement a refcount
while skb dst was not refcounted.
We should use skb_dst_drop(skb) instead.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
net/netfilter/xt_TEE.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/netfilter/xt_TEE.c b/net/netfilter/xt_TEE.c
index d7920d9..859d9fd 100644
--- a/net/netfilter/xt_TEE.c
+++ b/net/netfilter/xt_TEE.c
@@ -76,7 +76,7 @@ tee_tg_route4(struct sk_buff *skb, const struct xt_tee_tginfo *info)
if (ip_route_output_key(net, &rt, &fl) != 0)
return false;
- dst_release(skb_dst(skb));
+ skb_dst_drop(skb);
skb_dst_set(skb, &rt->u.dst);
skb->dev = rt->u.dst.dev;
skb->protocol = htons(ETH_P_IP);
@@ -157,7 +157,7 @@ tee_tg_route6(struct sk_buff *skb, const struct xt_tee_tginfo *info)
if (dst == NULL)
return false;
- dst_release(skb_dst(skb));
+ skb_dst_drop(skb);
skb_dst_set(skb, dst);
skb->dev = dst->dev;
skb->protocol = htons(ETH_P_IPV6);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xt_tee: use skb_dst_drop()
2010-05-28 9:24 [PATCH] xt_tee: use skb_dst_drop() Eric Dumazet
@ 2010-05-28 10:41 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-05-28 10:41 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, jengelh
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 28 May 2010 11:24:58 +0200
> After commit 7fee226a (net: add a noref bit on skb dst), its wrong to
> use : dst_release(skb_dst(skb)), since we could decrement a refcount
> while skb dst was not refcounted.
>
> We should use skb_dst_drop(skb) instead.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied, thanks Eric.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-28 10:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-28 9:24 [PATCH] xt_tee: use skb_dst_drop() Eric Dumazet
2010-05-28 10:41 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).