Re: [1/1] KVM: restrict kvm_gfn_to_hva_cache_init() to only accept address ranges within one page

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

 



On Fri, Apr 26, 2024 at 2:26 AM Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:

>
> I don't really have enough knowledge to comment on the functionality,
> but this code structure is really odd to read.
>
> Try to handle error conditions with early returns first, please:
>
>         if (unlikely(nr_pages_needed != 1))
>                 return -EINVAL;
>         return __kvm_gfn_to_hva_cache_init(slots, ghc, gpa, len);

Thanks for the tip!  This makes sense to me and I will take care of
this code structure.





[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