public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman•id.au>
To: Andrew Donnellan <andrew.donnellan@au1•ibm.com>,
	linuxppc-dev@lists•ozlabs.org, imunsie@au1•ibm.com,
	clombard@linux•vnet.ibm.com, fbarrat@linux•vnet.ibm.com
Cc: dan.carpenter@oracle•com
Subject: Re: cxl: fix potential NULL dereference in free_adapter()
Date: Wed, 20 Jul 2016 19:10:21 +1000 (AEST)	[thread overview]
Message-ID: <3rvWMx6Pv2z9t17@ozlabs.org> (raw)
In-Reply-To: <1468567236-5060-1-git-send-email-andrew.donnellan@au1.ibm.com>

On Fri, 2016-15-07 at 07:20:36 UTC, Andrew Donnellan wrote:
> If kzalloc() fails when allocating adapter->guest in
> cxl_guest_init_adapter(), we call free_adapter() before erroring out.
> free_adapter() in turn attempts to dereference adapter->guest, which in
> this case is NULL.
> 
> In free_adapter(), skip the adapter->guest cleanup if adapter->guest is
> NULL.
> 
> Fixes: 14baf4d9c739 ("cxl: Add guest-specific code")
> Reported-by: Dan Carpenter <dan.carpenter@oracle•com>
> Signed-off-by: Andrew Donnellan <andrew.donnellan@au1•ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/8fbaa51d43ef2c6a72849ec340

cheers

  reply	other threads:[~2016-07-20  9:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-14 21:53 [bug report] cxl: Add guest-specific code Dan Carpenter
2016-07-15  7:20 ` [PATCH] cxl: fix potential NULL dereference in free_adapter() Andrew Donnellan
2016-07-20  9:10   ` Michael Ellerman [this message]
2016-07-15  7:23 ` [bug report] cxl: Add guest-specific code Andrew Donnellan

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=3rvWMx6Pv2z9t17@ozlabs.org \
    --to=patch-notifications@ellerman$(echo .)id.au \
    --cc=andrew.donnellan@au1$(echo .)ibm.com \
    --cc=clombard@linux$(echo .)vnet.ibm.com \
    --cc=dan.carpenter@oracle$(echo .)com \
    --cc=fbarrat@linux$(echo .)vnet.ibm.com \
    --cc=imunsie@au1$(echo .)ibm.com \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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