Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6127032pxv; Thu, 29 Jul 2021 07:09:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtRMqX0r+dOCS3/jnUjfVsUfddc4p8U6ujL1HiEu0fI/bWBUaxAsT1rVtWNJjs+z8gWxtK X-Received: by 2002:a02:a1c8:: with SMTP id o8mr4594617jah.50.1627567798926; Thu, 29 Jul 2021 07:09:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627567798; cv=none; d=google.com; s=arc-20160816; b=X+33yWArwehKwIjJXRom53sm1WhJURoU3mxPMSo5hKgzcjE4bqOeOh44m9EezQRlA8 ywwPAk00yCxRs8Fmn9PU20hDddP679ovVRRzSvboSmSuioMIlduPQ4w70bCjDJGiLOjr m66fvF7OKZ9iEiHjGkU4gnDbN/YH4RsvVBIcxoIQIXm06YFwXIL6s9CQGHlkxEDlRJi5 0OQD3pcwVP08ElXJvnTnLn5sq2JoKvKNdWB/RKoQ4xO26tDVScWmtVtohvrqnb0JHNau 4v0YCvicsJWpQSEUohIrjBe3edYTTD4VYTb7fHRtbMiRi6amL4Ng6JdBC9Ch9EOz6KBJ hoog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2K2Ra7WccrgezErKOIffjf8Jvx2yuO7K6HdkEfBWNCQ=; b=KOlmXFdvHVL2uhpycQl1fZ0ummrGI00rY0OaKrO3N2SLyuoi5jQW+uH1UrgbIMGySY Ig7yluhQcK9cMoo7Y/wsWe9tZfhncqpEtfJlT+CiGBvNKWHIbvHE4g7YM7pgJeLK9RAe b/uCeJ/4/bhhshBitHkvtLt1NFNcvtEzlpNECACJm+YL8aHyeESaSwR0vdO2LqWLhVS7 Q7iJt1VDNZ1ty1r3jDU12091YzE0XozkOakqr+tu4k1MWGixqqGl1UxxqNkOSQTCtotR GAC7ogR+TBNuJehyTVB8xfBTjveJw4n5vXvpXJFljtvIOxyFg5cFvquTPi/uXpN5x/iL tuzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gbYH2u0h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v11si3873734jal.79.2021.07.29.07.09.46; Thu, 29 Jul 2021 07:09:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gbYH2u0h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239290AbhG2OIf (ORCPT + 99 others); Thu, 29 Jul 2021 10:08:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:48872 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238461AbhG2OA0 (ORCPT ); Thu, 29 Jul 2021 10:00:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CA76C61019; Thu, 29 Jul 2021 13:59:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627567168; bh=I983L7oRtDlUQSTgBEDiVJHD+hWOh53Y9trTkQwzkdo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gbYH2u0h80QXOhUTjjM0/vXWYy5gJVp46XKbugm2eTtTaAc8Ppf5IxS4Uuce7qG2h VMmuCm8TZVq+gMImKJe+mVRNCGFWX4xzRABLDepRHVq2bsTBO+ZN75+run5Exh4ArJ nOvZKdLXaFYGIWW3B/8azihrNw4pQgc1rlszK89Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vasily Averin , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.13 22/22] ipv6: ip6_finish_output2: set sk into newly allocated nskb Date: Thu, 29 Jul 2021 15:54:53 +0200 Message-Id: <20210729135138.024021497@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210729135137.336097792@linuxfoundation.org> References: <20210729135137.336097792@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vasily Averin [ 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: Vasily Averin Link: https://lore.kernel.org/r/70c0744f-89ae-1869-7e3e-4fa292158f4b@virtuozzo.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- net/ipv6/ip6_output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index b05f3f0da3a6..6062ad1d5b51 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); -- 2.30.2