Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9110660pxu; Mon, 28 Dec 2020 06:55:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJy2DzaRGRSwuhYkdQjlJSDVlOpg13CZ4zSWqWCyyKC8HGmn1VRqFCCOTtfWS8KxdwZ+ssni X-Received: by 2002:a05:6402:845:: with SMTP id b5mr43280392edz.38.1609167332170; Mon, 28 Dec 2020 06:55:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609167332; cv=none; d=google.com; s=arc-20160816; b=RavIhiKNSEU4Pc6b03f1ESPb9WZtyalj3nVevznlXVCUh6p36CBuoTiHeGIAd+GIG8 IbCaPyl413Dol9isKtuCdSUF5y+CBU57Vfj5LyX9PuqW8lYhyt8eCO6llJB7B+zvwWyC PCbrNdyHmR+udygiiiy3x6h7NEGKzyzvg8liH1g8U1ziRcQ0xWkzVzZ/XIjGlR9J4opz AAeT1MuampZdpoxcLFfknerkNNrUcKDD06aHvXwh7XeOLEXc/lbAZXXIRbWVc53q0/oS BV2XwmpULRs/1v4Js+l019FJh3CvyKSPCoAFc6ZDvK2OsGesSvgNk8yk4ag1D77v196K OpPw== 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=QC+K6pD/RuUopTrJRctLpqtjswKQ2vU/nNjAPg8CRcw=; b=QPBll72wmHKLr1CWbZOtFKTYUIxlp2IJWgzKCLvieBRgwTgBUjA0ZghyuBt9husUTh JZhQk9riC7fDws2z/XufUgKqK99YwKX4iq+NNX5Awsz3wjS+uyncmjtJoinYf2Jw0WEM ckhQegG1EMCG+Jvg+Zo9eV4kObgB49SjPP7bpLuwaDdmtRWMJOBovk+PZn3fBIOc/d+n RFPOFDNDTLMJYyD6tyOIFJ4WlgC7j4UbkmNYhKe8/ErP8FPfl9pj3oMXfSJdImkJC+Os FOhKTnjvnnqR6Zj7n5IYEfUEfSdOh18roGvnszXKC7MwjEKMhe0pydaD/p601en727WK qC2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GCLS0iui; 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 s18si16830109eji.157.2020.12.28.06.55.09; Mon, 28 Dec 2020 06:55:32 -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=GCLS0iui; 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 S2505417AbgL1OxE (ORCPT + 99 others); Mon, 28 Dec 2020 09:53:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:54492 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502109AbgL1OTg (ORCPT ); Mon, 28 Dec 2020 09:19:36 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 819712063A; Mon, 28 Dec 2020 14:19:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165161; bh=30wRvLYMuuuOmbb8sDTf0kxDzspVdth8YwEHI/ToWGo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GCLS0iuibm14bO12+MEN7c/Nat9vCH3+WEZZYxW5ikYWAwSEkDvQ+pTV2aHdAYHT5 CJDLESz4HqKfkuvXWlbB/0VKQAxLyzSW7lR2ZGlRBUwel5HG6zXwc0IpHVZ+z+kJAZ ODfI1V33AT6GCQwU4UksiOaReP7yHb2D/U/WLxdc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wang ShaoBo , Sascha Hauer , Richard Weinberger , Sasha Levin Subject: [PATCH 5.10 433/717] ubifs: Fix error return code in ubifs_init_authentication() Date: Mon, 28 Dec 2020 13:47:11 +0100 Message-Id: <20201228125041.716926890@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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: Wang ShaoBo [ Upstream commit 3cded66330591cfd2554a3fd5edca8859ea365a2 ] Fix to return PTR_ERR() error code from the error handling case where ubifs_hash_get_desc() failed instead of 0 in ubifs_init_authentication(), as done elsewhere in this function. Fixes: 49525e5eecca5 ("ubifs: Add helper functions for authentication support") Signed-off-by: Wang ShaoBo Reviewed-by: Sascha Hauer Signed-off-by: Richard Weinberger Signed-off-by: Sasha Levin --- fs/ubifs/auth.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/ubifs/auth.c b/fs/ubifs/auth.c index b93b3cd10bfd3..8c50de693e1d4 100644 --- a/fs/ubifs/auth.c +++ b/fs/ubifs/auth.c @@ -338,8 +338,10 @@ int ubifs_init_authentication(struct ubifs_info *c) c->authenticated = true; c->log_hash = ubifs_hash_get_desc(c); - if (IS_ERR(c->log_hash)) + if (IS_ERR(c->log_hash)) { + err = PTR_ERR(c->log_hash); goto out_free_hmac; + } err = 0; -- 2.27.0