public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Xiyu Yang <xiyuyang19@fudan.edu.cn>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Alexios Zavras <alexios.zavras@intel.com>,
	Allison Randal <allison@lohutok.net>,
	Adit Ranadive <aditr@vmware.com>,
	Jorgen Hansen <jhansen@vmware.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Vishnu DASA <vdasa@vmware.com>,
	linux-kernel@vger.kernel.org, yuanxzhang@fudan.edu.cn,
	kjlu@umn.edu, Xin Tan <tanxin.ctf@gmail.com>
Subject: Re: [PATCH v2] VMCI: Fix NULL pointer dereference on context ptr
Date: Mon, 23 Mar 2020 09:52:41 +0100	[thread overview]
Message-ID: <20200323085241.GA342330@kroah.com> (raw)
In-Reply-To: <1584951832-120773-1-git-send-email-xiyuyang19@fudan.edu.cn>

On Mon, Mar 23, 2020 at 04:22:33PM +0800, Xiyu Yang wrote:
> A NULL vmci_ctx object may pass to vmci_ctx_put() from its callers.

Are you sure this can happen?

> Add a NULL check to prevent NULL pointer dereference.
> 
> Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn>
> Signed-off-by: Xin Tan <tanxin.ctf@gmail.com>
> ---
>  drivers/misc/vmw_vmci/vmci_context.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

What changed from v1?

Always put that below the --- line.

Please fix up and send a v3.

thanks,

greg k-h

  reply	other threads:[~2020-03-23  8:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-23  8:22 [PATCH v2] VMCI: Fix NULL pointer dereference on context ptr Xiyu Yang
2020-03-23  8:52 ` Greg Kroah-Hartman [this message]
2020-03-23  9:16   ` Arnd Bergmann
2020-03-23 10:16     ` Jorgen Hansen
2020-03-29 12:08   ` Xiyu Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200323085241.GA342330@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=aditr@vmware.com \
    --cc=alexios.zavras@intel.com \
    --cc=allison@lohutok.net \
    --cc=arnd@arndb.de \
    --cc=jhansen@vmware.com \
    --cc=kjlu@umn.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tanxin.ctf@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=vdasa@vmware.com \
    --cc=xiyuyang19@fudan.edu.cn \
    --cc=yuanxzhang@fudan.edu.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox