linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
To: Nathan Fontenot <nfont@linux.vnet.ibm.com>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	Michael Ellerman <mpe@ellerman.id.au>
Subject: Re: [PATCH] powerpc/pseries: Fix possible leaked device node reference
Date: Thu, 30 Apr 2015 14:58:33 -0700	[thread overview]
Message-ID: <5542A589.9010703@linux.vnet.ibm.com> (raw)
In-Reply-To: <5541891A.6040506@linux.vnet.ibm.com>

On 04/29/2015 06:44 PM, Nathan Fontenot wrote:
> Failure return from dlpar_configure_connector when dlpar adding cpus
> results in leaking references to the cpus parent device node. Move the
> call to of_node_put() prior to checking the result of
> dlpar_configure_connector.
> 
> Fixes: 8d5ff320766f ("powerpc/pseries: Make dlpar_configure_connector parent node aware")

That commit went into 3.12. Shouldn't this be CC to stable?

-Tyrel

> 
> Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
> ---
>  arch/powerpc/platforms/pseries/dlpar.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c
> index 019d34a..47d9cebe 100644
> --- a/arch/powerpc/platforms/pseries/dlpar.c
> +++ b/arch/powerpc/platforms/pseries/dlpar.c
> @@ -421,11 +421,10 @@ static ssize_t dlpar_cpu_probe(const char *buf, size_t count)
>  		return -ENODEV;
>  
>  	dn = dlpar_configure_connector(cpu_to_be32(drc_index), parent);
> +	of_node_put(parent);
>  	if (!dn)
>  		return -EINVAL;
>  
> -	of_node_put(parent);
> -
>  	rc = dlpar_attach_node(dn);
>  	if (rc) {
>  		dlpar_release_drc(drc_index);
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
> 

  reply	other threads:[~2015-04-30 21:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-30  1:44 [PATCH] powerpc/pseries: Fix possible leaked device node reference Nathan Fontenot
2015-04-30 21:58 ` Tyrel Datwyler [this message]
2015-04-30 23:47   ` Michael Ellerman

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=5542A589.9010703@linux.vnet.ibm.com \
    --to=tyreld@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=nfont@linux.vnet.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).