From: Michael Ellerman <mpe@ellerman.id.au>
To: Rob Herring <robh@kernel.org>, abdul <abdhalee@linux.vnet.ibm.com>
Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Paul Mackerras <paulus@samba.org>,
sachinp <sachinp@linux.vnet.ibm.com>
Subject: Re: [mainline][DLPAR][Oops] OF: ERROR: Bad of_node_put() on /cpus
Date: Wed, 20 Sep 2017 21:39:05 +1000 [thread overview]
Message-ID: <87bmm5lhuu.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <CAL_JsqLXpU3kr7bD0NYZhYBbzxmGzqPL3j0jfLLMpSmXwPGvOw@mail.gmail.com>
Rob Herring <robh@kernel.org> writes:
> On Fri, Sep 15, 2017 at 6:04 AM, abdul <abdhalee@linux.vnet.ibm.com> wrote:
>> Hi,
>>
>> Mainline kernel panics during DLPAR CPU add/remove operation.
>>
>> Machine Type: Power8 PowerVM LPAR
>> kernel 4.13.0
>
> Did 4.12 work or when was it last working? I'm not seeing anything
> recent in the DT code that looks suspicious.
I'm pretty sure it's:
int dlpar_attach_node(struct device_node *dn, struct device_node *parent)
{
int rc;
dn->parent = parent;
rc = of_attach_node(dn);
if (rc) {
printk(KERN_ERR "Failed to add device node %pOF\n", dn);
return rc;
}
of_node_put(dn->parent);
HERE ^^^^^^^^^^
return 0;
}
Prior to 215ee763f8cb ("powerpc: pseries: remove dlpar_attach_node
dependency on full path"), we re-looked up the parent, and got another
reference on it. That meant the put before the return there was correct.
But now it's not because the caller has a reference to parent but it's
not ours to drop.
Testing a fix, will report back.
cheers
next prev parent reply other threads:[~2017-09-20 11:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-15 11:04 abdul
2017-09-15 12:52 ` Rob Herring
2017-09-19 13:36 ` Abdul Haleem
2017-09-20 11:39 ` Michael Ellerman [this message]
2017-09-20 17:23 ` Tyrel Datwyler
2017-09-21 9:57 ` Michael Ellerman
2017-09-21 18:48 ` Tyrel Datwyler
2017-09-22 11:59 ` Michael Ellerman
2017-09-20 21:02 ` [PATCH 1/2] powerpc/pseries: fix "OF: ERROR: Bad of_node_put() on /cpus" during DLPAR Tyrel Datwyler
2017-09-20 21:02 ` [PATCH 2/2] powerpc/pseries: fix parent_dn reference leak in add_dt_node() Tyrel Datwyler
2017-09-21 9:54 ` [PATCH 1/2] powerpc/pseries: fix "OF: ERROR: Bad of_node_put() on /cpus" during DLPAR Michael Ellerman
2017-09-21 18:41 ` Tyrel Datwyler
2017-09-22 1:03 ` [1/2] " Michael Ellerman
2017-09-22 10:05 ` Abdul Haleem
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=87bmm5lhuu.fsf@concordia.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=abdhalee@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
--cc=robh@kernel.org \
--cc=sachinp@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
all inboxes | Powered by JetHome®