diff options
author | Steffen Klassert <steffen.klassert@secunet.com> | 2010-06-04 01:57:38 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-04 15:56:00 -0700 |
commit | 8764ab2ca7ab5055e1ca80f9cfa4970c34acb804 (patch) | |
tree | ca0a6ea6c6fabbb98220f5b700981f7f23855f42 /net/xfrm/xfrm_output.c | |
parent | 4f4aeb7fd0f7e6ca008bb2147ba36cee13876595 (diff) | |
download | kernel_samsung_tuna-8764ab2ca7ab5055e1ca80f9cfa4970c34acb804.zip kernel_samsung_tuna-8764ab2ca7ab5055e1ca80f9cfa4970c34acb804.tar.gz kernel_samsung_tuna-8764ab2ca7ab5055e1ca80f9cfa4970c34acb804.tar.bz2 |
net: check for refcount if pop a stacked dst_entry
xfrm triggers a warning if dst_pop() drops a refcount
on a noref dst. This patch changes dst_pop() to
skb_dst_pop(). skb_dst_pop() drops the refcnt only
on a refcounted dst. Also we don't clone the child
dst_entry, so it is not refcounted and we can use
skb_dst_set_noref() in xfrm_output_one().
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm/xfrm_output.c')
-rw-r--r-- | net/xfrm/xfrm_output.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c index 6a32915..a3cca0a 100644 --- a/net/xfrm/xfrm_output.c +++ b/net/xfrm/xfrm_output.c @@ -95,13 +95,13 @@ resume: goto error_nolock; } - dst = dst_pop(dst); + dst = skb_dst_pop(skb); if (!dst) { XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTERROR); err = -EHOSTUNREACH; goto error_nolock; } - skb_dst_set(skb, dst); + skb_dst_set_noref(skb, dst); x = dst->xfrm; } while (x && !(x->outer_mode->flags & XFRM_MODE_FLAG_TUNNEL)); |