xt_tee: use skb_dst_drop()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, May 28, 2010 - 11:59 am

Gitweb:     http://git.kernel.org/linus/50636af715ac1ceb1872bd29a4bdcc68975c3263
Commit:     50636af715ac1ceb1872bd29a4bdcc68975c3263
Parent:     418bd0d4dfbff25ffe4365ddd3e7cba8c70ccba8
Author:     Eric Dumazet <eric.dumazet@gmail.com>
AuthorDate: Fri May 28 03:41:17 2010 -0700
Committer:  David S. Miller <davem@davemloft.net>
CommitDate: Fri May 28 03:41:17 2010 -0700

    xt_tee: use skb_dst_drop()
    
    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>
    Signed-off-by: David S. Miller <davem@davemloft.net>
---
 net/netfilter/xt_TEE.c |    4 ++--
 1 files 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);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
xt_tee: use skb_dst_drop(), Linux Kernel Mailing ..., (Fri May 28, 11:59 am)