Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1735730
| From | Michael Ellerman <mpe@ellerman.id.au> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [mainline][DLPAR][Oops] OF: ERROR: Bad of_node_put() on /cpus |
| Date | 2017-09-20 13:40 +0200 |
| Message-ID | <urLwd-2qd-5@gated-at.bofh.it> (permalink) |
| References | <upWFr-1Yr-3@gated-at.bofh.it> <upYnT-2Ux-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [mainline][DLPAR][Oops] OF: ERROR: Bad of_node_put() on /cpus Rob Herring <robh@kernel.org> - 2017-09-15 15:00 +0200
Re: [mainline][DLPAR][Oops] OF: ERROR: Bad of_node_put() on /cpus Abdul Haleem <abdhalee@linux.vnet.ibm.com> - 2017-09-19 15:40 +0200
Re: [mainline][DLPAR][Oops] OF: ERROR: Bad of_node_put() on /cpus Michael Ellerman <mpe@ellerman.id.au> - 2017-09-20 13:40 +0200
Re: [mainline][DLPAR][Oops] OF: ERROR: Bad of_node_put() on /cpus Tyrel Datwyler <tyreld@linux.vnet.ibm.com> - 2017-09-20 19:30 +0200
Re: [mainline][DLPAR][Oops] OF: ERROR: Bad of_node_put() on /cpus Michael Ellerman <mpe@ellerman.id.au> - 2017-09-21 12:00 +0200
Re: [mainline][DLPAR][Oops] OF: ERROR: Bad of_node_put() on /cpus Tyrel Datwyler <tyreld@linux.vnet.ibm.com> - 2017-09-21 20:50 +0200
Re: [mainline][DLPAR][Oops] OF: ERROR: Bad of_node_put() on /cpus Michael Ellerman <mpe@ellerman.id.au> - 2017-09-22 14:00 +0200
csiph-web