[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <592F6B37-93C9-4184-BCFF-3B25AF4F7562@dinechin.org>
Date: Wed, 27 Nov 2019 10:16:02 +0100
From: Christophe de Dinechin <christophe.de.dinechin@...il.com>
To: Haiwei Li <lihaiwei.kernel@...il.com>
Cc: "x86@...nel.org" <x86@...nel.org>, KVM list <kvm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
linux-crypto@...r.kernel.org,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"rkrcmar@...hat.com" <rkrcmar@...hat.com>,
Sean Christopherson <sean.j.christopherson@...el.com>,
"vkuznets@...hat.com" <vkuznets@...hat.com>,
"wanpengli@...cent.com" <wanpengli@...cent.com>,
"jmattson@...gle.com" <jmattson@...gle.com>,
"joro@...tes.org" <joro@...tes.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"bp@...en8.de" <bp@...en8.de>, "hpa@...or.com" <hpa@...or.com>,
thomas.lendacky@....com, gary.hook@....com,
herbert@...dor.apana.org.au, davem@...emloft.net
Subject: Re: [PATCH v2] KVM: SVM: Fix "error" isn't initialized
> On 27 Nov 2019, at 08:23, Haiwei Li <lihaiwei.kernel@...il.com> wrote:
>
> From e7f9c786e43ef4f890b8a01f15f8f00786f4b14a Mon Sep 17 00:00:00 2001
> From: Haiwei Li <lihaiwei@...cent.com>
> Date: Wed, 27 Nov 2019 15:00:49 +0800
> Subject: [PATCH v2] fix: 'error' is not initialized
>
> There are a bunch of error paths were "error" isn't initialized.
>
> Signed-off-by: Haiwei Li <lihaiwei@...cent.com>
> Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
> ---
> arch/x86/kvm/svm.c | 3 ++-
> drivers/crypto/ccp/psp-dev.c | 2 ++
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
> index 362e874..9eef6fc 100644
> --- a/arch/x86/kvm/svm.c
> +++ b/arch/x86/kvm/svm.c
> @@ -6308,7 +6308,8 @@ static int sev_flush_asids(void)
> up_write(&sev_deactivate_lock);
>
> if (ret)
> - pr_err("SEV: DF_FLUSH failed, ret=%d, error=%#x\n", ret, error);
> + pr_err("SEV: DF_FLUSH failed, ret=%d. PSP returned error=%#x\n",
> + ret, error);
This specific text change does not seem to match the patch description.
>
> return ret;
> }
> diff --git a/drivers/crypto/ccp/psp-dev.c b/drivers/crypto/ccp/psp-dev.c
> index 39fdd06..c486c24 100644
> --- a/drivers/crypto/ccp/psp-dev.c
> +++ b/drivers/crypto/ccp/psp-dev.c
> @@ -155,6 +155,8 @@ static int __sev_do_cmd_locked(int cmd, void *data, int *psp_ret)
> unsigned int phys_lsb, phys_msb;
> unsigned int reg, ret = 0;
>
> + *psp_ret = -1;
> +
> if (!psp)
> return -ENODEV;
>
> --
> 1.8.3.1
Powered by blists - more mailing lists