Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebb1b38b authored by Vasily Averin's avatar Vasily Averin Committed by Greg Kroah-Hartman
Browse files

ipv6: ip6_finish_output2: set sk into newly allocated nskb



[ Upstream commit 2d85a1b31dde84038ea07ad825c3d8d3e71f4344 ]

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: default avatarVasily Averin <vvs@virtuozzo.com>
Link: https://lore.kernel.org/r/70c0744f-89ae-1869-7e3e-4fa292158f4b@virtuozzo.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 6c041239
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -73,7 +73,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);