diff options
author | Vasily Averin <vvs@virtuozzo.com> | 2021-07-19 10:55:14 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-07-20 11:52:36 +0200 |
commit | 2d85a1b31dde84038ea07ad825c3d8d3e71f4344 (patch) | |
tree | bf8dd1c6812e6ccde4c4c47d97ae5ab438318ddc | |
parent | 6f20c8adb1813467ea52c1296d52c4e95978cb2f (diff) |
ipv6: ip6_finish_output2: set sk into newly allocated nskb
skb_set_owner_w() should set sk not to old skb but to new nskb.
Fixes: 5796015fa968 ("ipv6: allocate enough headroom in ip6_finish_output2()")
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Link: https://lore.kernel.org/r/70c0744f-89ae-1869-7e3e-4fa292158f4b@virtuozzo.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | net/ipv6/ip6_output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 01bea76e3891..e1b9f7ac8bad 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -74,7 +74,7 @@ static int ip6_finish_output2(struct net *net, struct sock *sk, struct sk_buff * if (likely(nskb)) { if (skb->sk) - skb_set_owner_w(skb, skb->sk); + skb_set_owner_w(nskb, skb->sk); consume_skb(skb); } else { kfree_skb(skb); |