Re: 答复: [PATCH] KVM: fix error handling in svm_hardware_setup

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

 




On 3/13/19 8:29 PM, Li,Rongqing wrote:
...

>>
>>
>> Does it make sense to call the svm_hardware_unsetup() instead of duplicating
>> the logic in error code path ?
>>
> 
> Thanks for your review;
> 
> Two thing needs to do if call svm_hardware_unsetup
> 
> 1. move svm_hardware_unsetup before svm_hardware_setup, to avoid declaration
> 2. remove __exit attribute for svm_hardware_unsetup , otherwise these is the below warning:
> 
>                WARNING: arch/x86/kvm/kvm-amd.o(.init.text+0x4aa): Section mismatch in reference from the function svm_hardware_setup() to         the function .exit.text:svm_hardware_unsetup()
>                The function __init svm_hardware_setup() references
>                a function __exit svm_hardware_unsetup().
>                This is often seen when error handling in the init function
>                uses functionality in the exit path.
>                The fix is often to remove the __exit annotation of
>                svm_hardware_unsetup() so it may be used outside an exit section.
> 
> 


Ah, I didn't realized that svm_hardware_unsetup has __exit attribute.
v1 looks good to me. thanks

Reviewed-by: Brijesh Singh <brijesh.singh@xxxxxxx>





[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