lkml.org 
[lkml]   [2017]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] virt/kvm avoids oops by adding parameter checking
From
Date
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@huawei.com>

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

Paolo

\
 
 \ /
  Last update: 2017-08-22 15:37    [W:0.041 / U:14.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site