Re: [PATCH 01/15] ARM: actions: fix a leaked reference by addingmissing of_node_put

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 4, 2019 at 3:48 PM Manivannan Sadhasivam
<manivannan.sadhasivam@xxxxxxxxxx> wrote:
> On Mon, Mar 04, 2019 at 01:29:33PM +0100, Linus Walleij wrote:
> > On Fri, Mar 1, 2019 at 4:55 PM Manivannan Sadhasivam
> > <manivannan.sadhasivam@xxxxxxxxxx> wrote:
> > > Hi Wen,
> > >
> > > On Fri, Mar 01, 2019 at 04:56:42PM +0800, Wen Yang wrote:
> > > > The call to of_get_next_child returns a node pointer with refcount
> > > > incremented thus it must be explicitly decremented after the last
> > > > usage.
> > > >
> > > > Detected by coccinelle with the following warnings:
> > > > ./arch/arm/mach-actions/platsmp.c:112:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 103, but without a corresponding object release within this function.
> > > > ./arch/arm/mach-actions/platsmp.c:124:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 115, but without a corresponding object release within this function.
> > > > ./arch/arm/mach-actions/platsmp.c:137:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 128, but without a corresponding object release within this function.
> > > >
> > >
> > > We have a floating patch for this:
> > > https://www.spinics.net/lists/arm-kernel/msg694544.html
> > >
> > > Andreas: Can you please take a second look at the patchset submitted by Linus
> > > Walleij and Russel for simplifying the Actions startup code?
> >
> > Andreas wrote a version of simplifying secondary startup in the
> > same spirit as Russell's patches, and it's merged and all
> > is fine I think.
> >
>
> Oops. I think I missed that! Can you please point me to that patch? And how it
> got merged? I did the PR for actions stuff this time and haven't included any
> mach-actions patches.

I just did git log arch/arm/mach-actions but I think it came in quite some time
ago, not last merge window:

But you see:
commit 6c2eb3e76fb84e2eb46d484f71fab469c0d9532c
"ARM: owl: smp: Drop owl_secondary_boot()"
commit bad29933fef76fb6ee577f4a0b6d145c1f52f663
"ARM: owl: smp: Use __pa_symbol()"
commit 18cfd9429d8a82c49add8f3ca9d366599bfcac45
"ARM: owl: smp: Drop bogus holding pen"

platsmp.c looks just fine these days. Except for what Wei's patch is fixing,
of_node_put().

Yours,
Linus Walleij



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux