Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1237651pxu; Mon, 23 Nov 2020 15:35:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJwhOAQnEfntV9sKx5FFojjNv+biAJ+gBVuKlzhvLl8+JNwdr7DP+VogPa76ijqq2vaskgHA X-Received: by 2002:a17:906:2e0f:: with SMTP id n15mr1792171eji.486.1606174529753; Mon, 23 Nov 2020 15:35:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606174529; cv=none; d=google.com; s=arc-20160816; b=tGls1Nh6l13F8CgiVcCsWcr6ORnQkHbDz5GYHVgbcsBDXNgW75Cr0dAuyq8mnV/093 W+uX69GdT0VQKlQPrULBUXDkw4SXLu7Qx+N4qZ4cubXVTFLnp/1Th6aEZhGqwsKkYKZ1 0MHOZuIjCyxwL2xipOQ2KEmdneRx+hZlguQYP7bNVNB46jrdSHO4hzmNDYuwLJ02oW0G +t57tVSl3SKgAcZ0X+pKA+9+8noVPA73D1wJredljontWbn0f6/yee+BpxG/6FwZR2cU MEqBczIPCi9/Vg35v8kSXVi5OBrVG/rvyGXOpNzO3Xh2CBrdjwjEB8H5KtkThdmZyhFh srHQ== 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=pZfu5bKA3ZofxHx/1sHQ5fX+DSIM95ZON6PZxlal5sc=; b=nsT2t4JxiO9p2pGk1qP+AU9oiYR39C6fe4uF63aQIrxMWL71lm4Dt+WYmoNgX1OsCy QrgS6CtqV5sSZrhdvLVwiI5I7m8Qj/uDKlTky8dYShYtKDtCO6SAH9oAJ9tTDBVILJct YEI/8uSEQMLB9mQ9cn4hPxhq+0J4ULgvFdqXFWwAvgSeekXeFGCrEVMLc5Bv/Gr0zxWM 3/gRU+R4oT7hN7AlETNTmGmav8Gg2nTrHJ3ZU05sG0XGI0ZV8nGG3TSlgJ6nuTJAtnDz byQha9C342zEwUz9UJZerRAQ43gU5YS5sHnLI6LyLbTSR+YD+d0BVrcBLb86qPfYh1iI vgAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Abx5NTJl; 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 d2si7619674edm.376.2020.11.23.15.35.07; Mon, 23 Nov 2020 15:35:29 -0800 (PST) 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=Abx5NTJl; 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 S1731297AbgKWMeC (ORCPT + 99 others); Mon, 23 Nov 2020 07:34:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:45672 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731289AbgKWMeA (ORCPT ); Mon, 23 Nov 2020 07:34:00 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 454E32076E; Mon, 23 Nov 2020 12:33:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606134838; bh=DAt5oMEL8wGO7kWrjuS7os4RE9HeZqc11z9UviTiBv0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Abx5NTJlzl9EXAi4Zvg/BjNzJjDb9u1M81hPmQGx+R7H0BMYfck8fWpAACDvZvMYP MhoHBhv0u1hbMkv0VWZV4XjeSf6f7eNK1buu0hAHZ02NGxQYsiGl0XHY5tiQRorubk f1ZFx1M/pfuRaiCgeQPZpEKrgQezVqvkpts4nN7c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Zhang Changzhong , Jakub Kicinski Subject: [PATCH 5.4 001/158] ah6: fix error return code in ah6_input() Date: Mon, 23 Nov 2020 13:20:29 +0100 Message-Id: <20201123121820.019912042@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201123121819.943135899@linuxfoundation.org> References: <20201123121819.943135899@linuxfoundation.org> User-Agent: quilt/0.66 X-stable: review X-Patchwork-Hint: ignore 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: Zhang Changzhong [ Upstream commit a5ebcbdf34b65fcc07f38eaf2d60563b42619a59 ] Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1605581105-35295-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/ipv6/ah6.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c @@ -588,7 +588,8 @@ static int ah6_input(struct xfrm_state * memcpy(auth_data, ah->auth_data, ahp->icv_trunc_len); memset(ah->auth_data, 0, ahp->icv_trunc_len); - if (ipv6_clear_mutable_options(ip6h, hdr_len, XFRM_POLICY_IN)) + err = ipv6_clear_mutable_options(ip6h, hdr_len, XFRM_POLICY_IN); + if (err) goto out_free; ip6h->priority = 0;