Re: [PATCH] virt/kvm avoids oops by adding parameter checking

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

 



On 22/08/2017 03:09, nixiaoming wrote:
> The error parameter passed through the external interface causes the system oops.
> So it is necessary to increase the parameter check for all EXPORT_SYMBOL_GPL
> 
> example:
>  void kvm_get_kvm(struct kvm *kvm)
>  {
>         refcount_inc(&kvm->users_count); /*oops if kvm == NULL */
>  }
>  EXPORT_SYMBOL_GPL(kvm_get_kvm);
> 
> Signed-off-by: nixiaoming <nixiaoming@xxxxxxxxxx>

No.  It's simply a precondition that kvm != NULL in this case.

Paolo



[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