lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAD-N9QVS_9BjpocLuW9GRKhOo4inP8hqn1mB4h-1mW+J9-zeyA@mail.gmail.com>
Date:   Tue, 14 Jun 2022 21:36:22 +0800
From:   Dongliang Mu <mudongliangabcd@...il.com>
To:     Vitaly Kuznetsov <vkuznets@...hat.com>
Cc:     Dongliang Mu <dzm91@...t.edu.cn>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Sean Christopherson <seanjc@...gle.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Jim Mattson <jmattson@...gle.com>,
        Joerg Roedel <joro@...tes.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
        "H. Peter Anvin" <hpa@...or.com>, kvm@...r.kernel.org,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86: kvm: remove NULL check before kfree

On Tue, Jun 14, 2022 at 8:01 PM Vitaly Kuznetsov <vkuznets@...hat.com> wrote:
>
> Dongliang Mu <dzm91@...t.edu.cn> writes:
>
> > From: mudongliang <mudongliangabcd@...il.com>
> >
> > kfree can handle NULL pointer as its argument.
> > According to coccinelle isnullfree check, remove NULL check
> > before kfree operation.
> >
> > Signed-off-by: mudongliang <mudongliangabcd@...il.com>
> > ---
> >  arch/x86/kernel/kvm.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
> > index 1a3658f7e6d9..d4e48b4a438b 100644
> > --- a/arch/x86/kernel/kvm.c
> > +++ b/arch/x86/kernel/kvm.c
> > @@ -236,8 +236,7 @@ void kvm_async_pf_task_wake(u32 token)
> >       raw_spin_unlock(&b->lock);
> >
> >       /* A dummy token might be allocated and ultimately not used.  */
> > -     if (dummy)
> > -             kfree(dummy);
> > +     kfree(dummy);
> >  }
> >  EXPORT_SYMBOL_GPL(kvm_async_pf_task_wake);
>
> Reviewed-by: Vitaly Kuznetsov <vkuznets@...hat.com>

Thanks for your review. My signature seems with an incorrect format,
so I send a v2 patch.


>
> --
> Vitaly
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ