Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1237472pxu; Mon, 23 Nov 2020 15:35:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJwY0p4z9YqlD74cIVD7mWx/U/1Uxw+2h2fb28l7xaE0hurgRaZvvxxKpkHuAc4K8YJ3Y3qC X-Received: by 2002:aa7:d883:: with SMTP id u3mr1530758edq.69.1606174514082; Mon, 23 Nov 2020 15:35:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606174514; cv=none; d=google.com; s=arc-20160816; b=QlAqyyRvKLA9pFYH+LkiI1UZB4BMZZFQd9dMOCxeotpmXTlNCvZ92J/quXgYrzKBEx eL48rTQgTbObojfcCI4jxKWq6IJDuUd2aFdbjX0cXWuLc/HYPu8d2tH6Xe1k41q3zdZL pNjATB6Su9JnlobFumPIVYhoHuUF5aLl489CiOrEUl33cfjVZPNFixPV6CzRUewZxv5S jVW9dDGFf6dVxF0mpbnmWoBU7kbk3OSAoAiBCV1SRxJlELLg1YD5+0be/hGb/q8eeU+J AS2b56I3uUQ13DLsG726Vmi6U+nziVt7+c9kmWX1CmlLJ8z6wCRgHCNSw0LHZuiyLvAW KPFg== 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=dQgBjpBMnuhDpRhBFeYemfAPb7aO4sDDlynIDg3se3A=; b=pqNInHPZ8sFz/Ejf/xDqBJ0pgWA1SHWEm1Hd+7kp+neiMoZFHTIES2XzJwMJAqJSrF eGuPdHHCPz8VNBqoOnZBn42Kr0z7pm9guke8BGaSoiFyhjfHJrM4Z6Pu3ueEXde7p2Nl 2+yZcqzpVHd9Mwk+ebluuQ/cbxEDywZAaA2n71DzlOl9qe4Cwgnux33+SdM2YarG9kOc FiTqlw8BFta1bwNjZak+gXJFjGbnQmnWxkIWRCxM0CvSruFeg0e7tb17ObTH6bLKYS/h OflJOAlOauaGZ4keaBdNVAZDichJuwb/7GYhyNdBawaUikDS6T0CSi3G8LZXS05RvTkT PgrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=A1yHfxJ4; 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 j3si2495219eja.61.2020.11.23.15.34.51; Mon, 23 Nov 2020 15:35:14 -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=A1yHfxJ4; 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 S1730850AbgKWMbZ (ORCPT + 99 others); Mon, 23 Nov 2020 07:31:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:42110 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730834AbgKWMbO (ORCPT ); Mon, 23 Nov 2020 07:31:14 -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 7DDB820728; Mon, 23 Nov 2020 12:31:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606134674; bh=/HOmZJjee+Umd/rtcD6KTjsut/JQ7cP3EzaAh1Vt1RI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A1yHfxJ4lZunyBC8RFPDKcbiNNVfKaqeE//k+xQjkqvLoDFgEHhxxF9ZM4yCXYJ+a LtojQTt/i+saQcYkHkznf3HJ5dH1geb19siOv2iNwVbS/XEj/cTfBP06D2wWXztFE2 vwam/A2c68WeiRmheEFlvm55P1aFq7S1woE5vxC8= 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 4.19 01/91] ah6: fix error return code in ah6_input() Date: Mon, 23 Nov 2020 13:21:21 +0100 Message-Id: <20201123121809.364368880@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201123121809.285416732@linuxfoundation.org> References: <20201123121809.285416732@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 @@ -600,7 +600,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;