Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp984884pxb; Wed, 6 Apr 2022 06:03:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweawW2u8aLg4K49RqvBCx0eMnbiWTj0l9RkoY+ZT8aA4/Je2PvmQLdz1ZtqK+4v1O0oEMI X-Received: by 2002:a05:6638:358b:b0:323:e3b0:bee3 with SMTP id v11-20020a056638358b00b00323e3b0bee3mr4788704jal.302.1649250216094; Wed, 06 Apr 2022 06:03:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649250216; cv=none; d=google.com; s=arc-20160816; b=To/BFX9v/K8gUzeETgYuEiL/IEBtPg/0yJOvcNpm1RZNZzAOyTUBrTFtdqzSU/U6a7 RKYw19SgFdoLXOboF5CijvPSzOO0chkMVmgvKzLSS8JDw65qT3qA0LlQv5ucK6ttgTO2 hdJ+WrRp2Wt7f/CQwHNnHWUPN9cT8tr6fUV8jzYb2Oil886lCNq+uZo8oKsvTzi5RKWT ZzNdFxDgsbkC6w3tmqjhDeqwvkgfbGsuyysutPiUKPdK4Y5u2ddfUMFlQxO4plQsrZ7F VHKlLCPJvcGEqu3G2h6JVCtaTpZayU7CwJlzUn12ibroembC0oGesF1jvfpt3GqyoBoY 0S0g== 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=1IpxU/Z/Rh01PFVJ4xbt3MRNDqNM4c9Sp2DRq65x0Rs=; b=QEKXRSTqVd7mxiq8mITrLz2+2FWPha+ROPnbvWKvZn3QyUIfGEcsy+vZ5PvTnW6L0n tXBCaI2TtDBUX1d2o2Q7Ck57QEH0ajwpP+y2BfMwPMCDinSEGraZ2+MVIBDvyiWI93X1 zAI9PQq8R5RS4Xu07QAVLRDg9+Ws/s9XWnFXaPdxfw8LNqz6PY7tNEJ7gYvwbsgKEj+g 6PzVpuQVVb/hEdaONh5rdejVbpdFrZymseFiZgarHKCY7zVyAz25QTh5A517m+oPkZ9k 8oGMUlon4ctJq1y2Uh9outz+TbmFbE1RAsw9c84pBf7ZWlNonWHoNrCLZcXf3RNh1Rm4 YX8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=E+ambTHN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id z4-20020a056638240400b00321389f66a6si9247984jat.34.2022.04.06.06.03.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 06:03:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=E+ambTHN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 52FDE1F3A73; Wed, 6 Apr 2022 03:23:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383308AbiDEMZ1 (ORCPT + 99 others); Tue, 5 Apr 2022 08:25:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245151AbiDEIyM (ORCPT ); Tue, 5 Apr 2022 04:54:12 -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 D5C27DC7; Tue, 5 Apr 2022 01:51:40 -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 86617B81BC5; Tue, 5 Apr 2022 08:51:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBA32C385A0; Tue, 5 Apr 2022 08:51:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148698; bh=I3uEnA03OADDN1LfFcs2Xj8Bm+YZGExuC8qCYOwy7vY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E+ambTHNp+2zziX1jcm43J+5VLTU5kLl1oeKa2c7F2KPAMJt2XxY0chYmr9FsyuT6 iMdVfICFLO556WcA46ZP1UOorozZx3xIe4Eo5AxXLBwQ4vlbnnk2tZYQUXL5yVAiJS zpykGYOX/DQHu51yWcF2Tdi7NssYZtMf7Ha/cHA4= 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.16 0449/1017] KVM: PPC: Book3S HV: Check return value of kvmppc_radix_init Date: Tue, 5 Apr 2022 09:22:42 +0200 Message-Id: <20220405070407.626414774@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 a2fd1db29f7e..7fa685711669 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -6101,8 +6101,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