Re: [PATCH] KVM: SVM: Fix "error" isn't initialized

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Haiwei Li <lihaiwei@xxxxxxxxxxx>
> 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@xxxxxxxxxxx>
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
>--- 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,




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux