Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1236671pxu; Mon, 23 Nov 2020 15:33:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJwmfLewap7WT7xeBv4jcj8kl9+p4I1fWpk9I98qIEkXohGxYcDAdEH0uNxqRfsw/eNhEYa1 X-Received: by 2002:a05:6402:144b:: with SMTP id d11mr1521541edx.195.1606174437100; Mon, 23 Nov 2020 15:33:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606174437; cv=none; d=google.com; s=arc-20160816; b=i0mVfxf2IZeFVaiD2MwwEFOoW569hzeX6eqsOKB+1W5T5sNHHkOi8UGckbZfSI06sG QsIjLRlyIskgG3sYxVGjRj0Z42zJegCQx2kSW+xMnJbWIabv4xJsOQjAGFkkIVOnl35L ATVAYgpZ2JCkk3y0ehVdFa2nstLZLP+RE/DlmsKen4W8iNU4LoRDxOL37v2DOdEY00BQ u+kym47y/WI3cBjpeHdk0UaO5BZqDUZEYRr5ZcaLLWkxqdrWIjzii2bYWSFCpXq1pVFT SgxQjITAglCzzzE7vqjLJ24mS8QZXQKunNMyNGuc4Rd3w4BxfeIiSem2XeCcEc/nruo1 Ko0w== 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=Bcg3GJYclWvl8fssxLl2aW+r9WQpLJD7xjD1gFbNCek=; b=OR6oSDHjuSWn3aPXP4a7FSPoXt2dKsd8NoNYNsrseEd49XTyV2MuKaDJprcywwBAp1 91oFRD2DNUP4KVaH0EvxIYYPJoG2RF0YkjMV7QJ+O5qEufU/VPaNNAP8I4jqzKBhKAfR 1xACtjutSnfqBaZ9RAuiTYlzDgQCvMzdU/JCSfRg05MaBn+Un1BcLcqXypl+26F6Fg0h pqfrXr3D7JGNMgGzR0fH+0/DAXsFyf1AlMBcNpBjJ6MHdocdccR653wdWpSfaingQT24 l191ZzmXIDiopdTfQa2rk6W/aTL5R32MPo3AAX6p8F8yX5EAxgChDk7MvStTmO6ODP5D amWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XGXenFev; 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 bx13si7643810edb.260.2020.11.23.15.33.35; Mon, 23 Nov 2020 15:33:57 -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=XGXenFev; 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 S1730234AbgKWM06 (ORCPT + 99 others); Mon, 23 Nov 2020 07:26:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:36806 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730204AbgKWM0t (ORCPT ); Mon, 23 Nov 2020 07:26:49 -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 BA36620781; Mon, 23 Nov 2020 12:26:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606134409; bh=+CMwAKeIBf4w/ag11G0vWIlP8yGJgsq8f4J1Mse+Zjk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XGXenFevQmAwJ0VKhbLI5OSlrtXN7y5mAgWA7xyLEWtBVQtyL7ENqK1MRqLesHYof u1QZvT+nCBHHGkTGA/PT+gfBGrfHod7WbJ7SxfOijKtvY6M9QNPbIugzQZS9lsM73H VHyps6HFgYdJu0Unc3XO44eV0lqbDXcio8Z1C7nA= 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.14 01/60] ah6: fix error return code in ah6_input() Date: Mon, 23 Nov 2020 13:21:43 +0100 Message-Id: <20201123121805.103199804@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201123121805.028396732@linuxfoundation.org> References: <20201123121805.028396732@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 @@ -599,7 +599,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;