From patchwork Mon Feb 12 19:21:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 872343 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3zgFrq2tSsz9rxj; Tue, 13 Feb 2018 06:21:15 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1elJf1-0001GD-Ve; Mon, 12 Feb 2018 19:21:07 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1elJey-0001Fm-Q2 for kernel-team@lists.ubuntu.com; Mon, 12 Feb 2018 19:21:04 +0000 Received: from 1.general.apw.uk.vpn ([10.172.192.78] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1elJey-0003Da-He; Mon, 12 Feb 2018 19:21:04 +0000 From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [xenial/master-next 1/1] UBUNTU: SAUCE: net: ipv4: fix for a race condition in raw_sendmsg -- fix backport Date: Mon, 12 Feb 2018 19:21:02 +0000 Message-Id: <20180212192102.14974-2-apw@canonical.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180212192102.14974-1-apw@canonical.com> References: <20180212192102.14974-1-apw@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andy Whitcroft MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" Fix a miss-backport of the upstream commit. Fixes: 63da13a92f24 ("net: ipv4: fix for a race condition in raw_sendmsg -- fix backport") BugLink: http://bugs.launchpad.net/bugs/1748671 Signed-off-by: Andy Whitcroft Acked-by: Khalid Elmously --- net/ipv4/raw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 83a609bc7c57..3b764c0c1fec 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c @@ -621,7 +621,7 @@ static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) goto done; } - if (hdrincl) { + if (!hdrincl) { rfv.msg = msg; rfv.hlen = 0;