Re: [PATCH] KVM: apic: avoid calculating pending eoi from an uninitialized val

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

 



Vitaly Kuznetsov <vkuznets@xxxxxxxxxx> writes:
>linmiaohe <linmiaohe@xxxxxxxxxx> writes:
>> When get user eoi value failed, var val would be uninitialized and 
>> result in calculating pending eoi from an uninitialized val. 
>> Initialize var val to 0 to fix this case.
>
>Let me try to suggest an alternative wording,
>
>"When pv_eoi_get_user() fails, 'val' may remain uninitialized and the return value of pv_eoi_get_pending() becomes random. Fix the issue by initializing the variable."

Sounds much better. You're really good at it. :) Thanks.

>>
>>
>Reviewed-by: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>
>
>But why compilers don't complain?

Maybe it's because @val only remain uninitialized when pv_eoi_get_user() failed?




[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