diff options
author | Steffen Klassert <steffen.klassert@secunet.com> | 2011-03-15 21:09:32 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-27 17:55:01 -0700 |
commit | e433430a0ca9cc1b851a83ac3b305e955b64880a (patch) | |
tree | 129e0c5db7e5643352ac55a920b5d6c5ef65fb66 /include/net/dst.h | |
parent | 3bc07321ccc236f693ce1b6a8786f0a2e38bb87e (diff) | |
download | linux-stable-e433430a0ca9cc1b851a83ac3b305e955b64880a.tar.gz linux-stable-e433430a0ca9cc1b851a83ac3b305e955b64880a.tar.bz2 linux-stable-e433430a0ca9cc1b851a83ac3b305e955b64880a.zip |
dst: Clone child entry in skb_dst_pop
We clone the child entry in skb_dst_pop before we call
skb_dst_drop(). Otherwise we might kill the child right
before we return it to the caller.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/dst.h')
-rw-r--r-- | include/net/dst.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/dst.h b/include/net/dst.h index 2a46cbaef92d..75b95df4afe7 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -345,7 +345,7 @@ static inline void skb_tunnel_rx(struct sk_buff *skb, struct net_device *dev) static inline struct dst_entry *skb_dst_pop(struct sk_buff *skb) { - struct dst_entry *child = skb_dst(skb)->child; + struct dst_entry *child = dst_clone(skb_dst(skb)->child); skb_dst_drop(skb); return child; |