From: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>,
Rob Herring <robh@kernel.org>,
abdul <abdhalee@linux.vnet.ibm.com>
Cc: sachinp <sachinp@linux.vnet.ibm.com>,
Paul Mackerras <paulus@samba.org>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [mainline][DLPAR][Oops] OF: ERROR: Bad of_node_put() on /cpus
Date: Thu, 21 Sep 2017 11:48:22 -0700 [thread overview]
Message-ID: <bef5b448-cc23-a656-7048-3d74ef82f508@linux.vnet.ibm.com> (raw)
In-Reply-To: <87fubgcr2g.fsf@concordia.ellerman.id.au>
On 09/21/2017 02:57 AM, Michael Ellerman wrote:
> Tyrel Datwyler <tyreld@linux.vnet.ibm.com> writes:
>> On 09/20/2017 04:39 AM, Michael Ellerman wrote:
>>> Rob Herring <robh@kernel.org> writes:
<snip>
>>>
>>> Testing a fix, will report back.
>>
>> So, that patch slipped past me. Not only is the parent reference not ours to drop, but
>> when I went and looked at dlpar_cpu_add() I also noticed that of_node_put() was done on
>> the parent prior to the call to dlpar_attach_node(). With the addition of "parent" to the
>> dlpar_attach_node() parameter list dlpar_cpu_add() needs to be fixed up to hold the
>> "parent" reference until after dlpar_attach_node() returns.
>
> Yep. I wrote the same patch :)
>
> Rob asked me to test it, which I did, but /cpus starts out with an
> elevated ref count, so you have to do ~30 (on my system) DLPAR removes
> to hit the bug, which I didn't do.
Yeah, there are a lot of things that grab references to /cpus. So, I had a good idea that
I needed to loop a few times adding and removing multiple cpus to trigger the issue. Its
also obvious when using those OF trace points I wrote a while back that refcount for /cpus
is dropping off uncharacteristically in response to symmetrical adds/removes of cpus. I
saw your note about getting that patchset resubmitted. I'll try and get that queued back
up soon.
-Tyrel
>
> I've updated my test script to do roughly $(nproc) x 10 DLPAR removes,
> which is hopefully sufficient to catch these bugs in future.
>
> cheers
>
next prev parent reply other threads:[~2017-09-21 18:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-15 11:04 [mainline][DLPAR][Oops] OF: ERROR: Bad of_node_put() on /cpus abdul
2017-09-15 12:52 ` Rob Herring
2017-09-19 13:36 ` Abdul Haleem
2017-09-20 11:39 ` Michael Ellerman
2017-09-20 17:23 ` Tyrel Datwyler
2017-09-21 9:57 ` Michael Ellerman
2017-09-21 18:48 ` Tyrel Datwyler [this message]
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=bef5b448-cc23-a656-7048-3d74ef82f508@linux.vnet.ibm.com \
--to=tyreld@linux.vnet.ibm.com \
--cc=abdhalee@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--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;
as well as URLs for NNTP newsgroup(s).