[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131125085915.GA22043@ulmo.nvidia.com>
Date: Mon, 25 Nov 2013 09:59:16 +0100
From: Thierry Reding <thierry.reding@...il.com>
To: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Cc: Daniel Lezcano <daniel.lezcano@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>,
Arnd Bergmann <arnd@...db.de>,
Rob Herring <rob.herring@...xeda.com>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
David Brown <davidb@...eaurora.org>
Subject: Re: [PATCH] clocksource: Do not drop unheld reference on device node
On Mon, Nov 25, 2013 at 08:29:23AM +0100, Uwe Kleine-König wrote:
> Hello Daniel,
>
> On Sun, Nov 24, 2013 at 10:28:15PM +0100, Daniel Lezcano wrote:
> > On 11/22/2013 08:22 PM, Uwe Kleine-König wrote:
> > >On Fri, Nov 22, 2013 at 05:31:46PM +0100, Daniel Lezcano wrote:
> > >>On 11/22/2013 05:16 PM, Thierry Reding wrote:
> > >>>On Sat, Oct 19, 2013 at 12:49:48AM +0200, Thierry Reding wrote:
> > >>Yes. Sounds like I missed it.
> > >>
> > >>This regression has been introduced by:
> > >>
> > >>commit 326e31eebe61dc838e031ea16968b2cfb43443e3
> > >>Author: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
> > >>Date: Tue Oct 1 11:00:53 2013 +0200
> > >>
> > >> clocksource: Put nodes passed to CLOCKSOURCE_OF_DECLARE
> > >>callbacks centrally
> > >>
> > >> Instead of letting each driver call of_node_put do it centrally in the
> > >> loop that also calls the CLOCKSOURCE_OF_DECLARE callbacks. This is less
> > >> prone to error and also moves getting and putting the references
> > >>into the
> > >> same function.
> > >>
> > >> Consequently all respective of_node_put calls in drivers are removed.
> > >>
> > >> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
> > >> Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>
> > >> Acked-by: David Brown <davidb@...eaurora.org>
> > >Still all but the hook in clocksource_of_init of this commit was
> > >correct, right? (Well, but this buggy hunk makes the commit log wrong.)
> >
> > I don't understand your comment, can you elaborate ?
> My patch added an of_node_put in clocksource_of_init and dropped several
> of_node_puts in drivers. This thread is about the first being wrong. My
> question was if dropping the others was correct.
Yes, it looks to me like the others were correct. A reference on np is
taken by the for_each_matching_node_and_match() in clocksource_of_init()
and released when through the loop, or rather on the next iteration. So
it would be an error to release the reference within the driver-specific
initializations, since they don't take a reference of their own.
Thierry
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists