[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <3b418fab6b804c6cba48e372cce875c1@huawei.com>
Date: Wed, 27 Nov 2019 03:30:06 +0000
From: linmiaohe <linmiaohe@...wei.com>
To: Haiwei Li <lihaiwei.kernel@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"x86@...nel.org" <x86@...nel.org>
CC: "pbonzini@...hat.com" <pbonzini@...hat.com>,
"rkrcmar@...hat.com" <rkrcmar@...hat.com>,
"sean.j.christopherson@...el.com" <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>
Subject: Re: [PATCH] KVM: SVM: Fix "error" isn't initialized
> From: Haiwei Li <lihaiwei@...cent.com>
> Subject: [PATCH] initialize 'error'
>
> There are a bunch of error paths were "error" isn't initialized.
Hi,
In case error case, sev_guest_df_flush() do not set the error.
Can you set the value of error to reflect what error happened
in sev_guest_df_flush()?
The current fix may looks confused when print "DF_FLUSH failed" with
error = 0.
Thanks.
PS: This is just my personal point.
>
> Signed-off-by: Haiwei Li <lihaiwei@...cent.com>
> Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
>--- a/arch/x86/kvm/svm.c
>+++ b/arch/x86/kvm/svm.c
>@@ -6294,7 +6294,8 @@ static int enable_smi_window(struct kvm_vcpu *vcpu)
>
> static int sev_flush_asids(void)
> {
>- int ret, error;
>+ int ret;
>+ int error = 0;
>
> /*
> * DEACTIVATE will clear the WBINVD indicator causing DF_FLUSH to fail,
Powered by blists - more mailing lists