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
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux