Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp687171pxb; Tue, 5 Apr 2022 18:48:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwebuEQSxaeNAepI/FbOC5Ot07R8sgChnTuUdVt9kkOrmNq2+/Up+1SjZHoXpO8N2LMCUXm X-Received: by 2002:a17:90b:3ecb:b0:1c7:5634:df6f with SMTP id rm11-20020a17090b3ecb00b001c75634df6fmr7344587pjb.184.1649209721256; Tue, 05 Apr 2022 18:48:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649209721; cv=none; d=google.com; s=arc-20160816; b=FGchOWFIvbYBF7o9rMaM9zWak3Nm4fkNcbDLJVvWWTSP1FxjhUgwakxpiL09Y9W11b iATz+ZqfJ+i7tKdJBuyg4jQNDQDir3zEN3DVU6QMmTBzHYRzS1xq3otYqOkxCe4m0zXT lxQ65cDU7ObBJ5OAx82px47LdAQHeP1F1djZO6AN/03Yc+mYDRBA008TXDqrW2RiIq4V KGgc0eNGPlL0B2Bh3nYJK8/pn4U3rPTDHxggH9oTWdXf77PJoJIIW9RheSScsSBYuwfo i9BjV8ZKOuu+CgDRT5OKuhRk44MdB7qdaXUmpjdH9wozh52SsMLdd5jK3YjOnU8ICH7F hwXA== 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=K/gxgQN2zI+FG1+Ueoxn+tDkSFqbnsEz+FezSsGbFtA=; b=vW+4fgi+W+ppPQfC+ooqbmKq6PJS14doP30wrauJY6lTXYX28/0QHVHBNanPhYe6hM +ReIexeLL6LNOKuBAWv7R7IhhogdJybsc/LDRiVDYGbUdxKJVoywNZZP16246v2A+NPP FLg2OlHEYOjEKTq8aKxnz2br0uge6EFL0+gwIKnycgcUxLD8kaylOfKtx7wFSIivhcOb DXz5yaN0MNcL24nZFK71HpnW00/yDU4UlFqQAeud6QDdLhOK8u3Yst2iSMUDM5owvdjr uLkb7vnvwH0eWCiYtVQYI6z/XYQCgsCEFVj+52Uqd1vbK/W5Gyq8Abs2ViX1rlWwoKAI BpDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KIkjv8yp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l5-20020a170903120500b001548692dbf1si13662833plh.597.2022.04.05.18.48.26; Tue, 05 Apr 2022 18:48:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KIkjv8yp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S239295AbiDEIpF (ORCPT + 99 others); Tue, 5 Apr 2022 04:45:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233098AbiDEIFK (ORCPT ); Tue, 5 Apr 2022 04:05:10 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1474A68336; Tue, 5 Apr 2022 01:01:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C5AE2B81B90; Tue, 5 Apr 2022 08:01:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 116EBC340EE; Tue, 5 Apr 2022 08:01:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649145678; bh=3DLPFpwpBfYmtbHQR4E9B3L8j/zW8+jMh4WpLzPmq9o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KIkjv8ypOekBuxRklTmctCq5ObYlAzJeOx0zl9TsWOJ8VkQDlxxQr7PYu5bPwhvGB /ufPDRBi8ies6N9djrApxe6+CCEYa3nNMpM/QApAbdsxjF743tJ37NHbXCy5pxjT45 d6zHX9RHeqr+VpT1YdTy9maN0V/NRdfvpqHCLoRQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Fabiano Rosas , Nicholas Piggin , Michael Ellerman , Sasha Levin Subject: [PATCH 5.17 0490/1126] KVM: PPC: Book3S HV: Check return value of kvmppc_radix_init Date: Tue, 5 Apr 2022 09:20:37 +0200 Message-Id: <20220405070422.010412441@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Fabiano Rosas [ Upstream commit 69ab6ac380a00244575de02c406dcb9491bf3368 ] The return of the function is being shadowed by the call to kvmppc_uvmem_init. Fixes: ca9f4942670c ("KVM: PPC: Book3S HV: Support for running secure guests") Signed-off-by: Fabiano Rosas Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220125155735.1018683-2-farosas@linux.ibm.com Signed-off-by: Sasha Levin --- arch/powerpc/kvm/book3s_hv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 84c89f08ae9a..791db769080d 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -6137,8 +6137,11 @@ static int kvmppc_book3s_init_hv(void) if (r) return r; - if (kvmppc_radix_possible()) + if (kvmppc_radix_possible()) { r = kvmppc_radix_init(); + if (r) + return r; + } r = kvmppc_uvmem_init(); if (r < 0) -- 2.34.1