kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: device_node lifetime (was: Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put)
Date: Thu, 19 Nov 2015 19:14:28 +0000	[thread overview]
Message-ID: <20151119191428.GB8644@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CAL_JsqLQWh8-gshYLrYwrrRjBRXiOACh9LzVn2HUU38mfgYGoQ@mail.gmail.com>

On Thu, Nov 19, 2015 at 12:44:11PM -0600, Rob Herring wrote:
> On Wed, Nov 18, 2015 at 1:05 PM, Brian Norris
> <computersforpeace@gmail.com> wrote:
> > (changing subject, add devicetree@vger.kernel.org)
> >
> > On Tue, Nov 17, 2015 at 11:33:25PM +0100, Julia Lawall wrote:
> >> On Tue, 17 Nov 2015, Brian Norris wrote:
> >> > On Tue, Nov 17, 2015 at 06:48:39PM +0100, Julia Lawall wrote:
> >> > > Is this something that should be checked for elsewhere?
> >> >
> >> > I expect the same sort of problem shows up plenty of other places. I
> >> > don't think many people use CONFIG_OF_DYNAMIC, so the effects of these
> >> > failures probably aren't felt by many.
> 
> The "problem" is non-existent because either CONFIG_OF_DYNAMIC is off
> or where it is used is limited (memory and cpus on PSeries) and now
> overlays. Overlays have the potential to be problematic, but we should
> manage ref counting for overlays in a completely different way. What
> that looks like, I don't know. I'll leave that to the person that
> cares about removing overlays.

So are you saying we should just forget about of_node_put and delete all
of_node_put/of_node_get references in code outside drivers/of ?  That
seems pretty obtuse given that we do have the overlay code merged, and
sounds to me like a very bad idea.

Expecting those who want to use overlays to run around checking that
the refcounting is correct in drivers is a really silly idea IMHO -
the existing API is refcounted, so either people really ought to be
using it correctly as it's already been designed (in other words, with
correct refcounting, and we shouldn't be shovelling this problem onto
other people) or the refcounting should be completely killed.

The existing half-way house of "we have refcounting, but we don't care
about it" is really insane.

Either we have refcounting, and it's used properly, or we don't have
refcounting.  No middle ground IMHO.

-- 
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

  reply	other threads:[~2015-11-19 19:14 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-16 11:33 [PATCH 0/7] add missing of_node_put Julia Lawall
2015-11-16 11:33 ` [PATCH 1/7] phy: brcmstb-sata: " Julia Lawall
2015-11-17  1:38   ` Brian Norris
2015-11-17  6:12     ` Julia Lawall
2015-11-17 17:44       ` Brian Norris
2015-11-17 17:48         ` Julia Lawall
2015-11-17 18:30           ` Brian Norris
2015-11-17 18:34             ` Brian Norris
2015-11-17 22:33             ` Julia Lawall
2015-11-18 19:05               ` device_node lifetime (was: Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put) Brian Norris
2015-11-18 20:39                 ` Julia Lawall
2015-11-19 18:44                 ` Rob Herring
2015-11-19 19:14                   ` Russell King - ARM Linux [this message]
2015-11-27 14:26     ` [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put Kishon Vijay Abraham I
2015-11-16 11:33 ` [PATCH 2/7] phy: mt65xx-usb3: " Julia Lawall
2015-11-16 11:33 ` [PATCH 3/7] phy: berlin-sata: " Julia Lawall
2015-11-19 20:48   ` Sebastian Hesselbarth
2015-11-16 11:33 ` [PATCH 4/7] phy: rockchip-usb: " Julia Lawall
2015-11-18 19:27   ` Heiko Stübner
2015-11-18 19:31     ` Brian Norris
2015-11-18 19:46       ` Heiko Stübner
2015-11-18 20:38         ` Julia Lawall
2015-11-18 20:40           ` Heiko Stübner
2015-11-18 21:42   ` Heiko Stübner
2015-11-16 11:33 ` [PATCH 5/7] phy: miphy28lp: " Julia Lawall
2015-11-16 11:33 ` [PATCH 6/7] phy: miphy365x: " Julia Lawall
2015-11-16 11:33 ` [PATCH 7/7] phy: cygnus: pcie: " Julia Lawall
2015-11-16 17:12   ` Ray Jui

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=20151119191428.GB8644@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).