Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1273375

Re: device_node lifetime (was: Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put)

From Rob Herring <robh@kernel.org>
Newsgroups linux.kernel
Subject Re: device_node lifetime (was: Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put)
Date 2015-11-19 19:50 +0100
Message-ID <qwCro-4G9-21@gated-at.bofh.it> (permalink)
References (4 earlier) <qvSye-8a9-11@gated-at.bofh.it> <qvSye-8a9-9@gated-at.bofh.it> <qvTkC-f2-17@gated-at.bofh.it> <qvX4R-2FN-3@gated-at.bofh.it> <qwghc-77w-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

>> basically, this says that a structure field is initilized to a device node
>> value, the structure is returned by the containing function, and the
>> containing function contains no of_node_get at all.  Certainly this is
>> quite constrained, but it does produce a number of examples.

I've got no idea if this is right or not.

>> drivers/of/pdt.c, function of_pdt_create_node
>
> Not real sure about this one.

SPARC. Stay away.

>
>> Any idea whether these need of_node_get?  In all cases the device node
>> value comes in as a parameter.
>
> I'm really not an expert on this stuff. I just saw a potential problem
> that I happen to be looking at in other subsystems, and I wanted to know
> what others thought. I think this discussion should include the DT folks
> and the subsystems in question. For one, I'm as interested as anyone in
> getting this todo clarified:
>
> Documentation/devicetree/todo.txt
> - Document node lifecycle for CONFIG_OF_DYNAMIC

Step 2 after figuring out it can't be documented is "define a new way
to handle dynamic DT refcounting aka how to get rid of
of_node_get/put."

Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/7] add missing of_node_put Julia Lawall <Julia.Lawall@lip6.fr> - 2015-11-16 12:50 +0100
  [PATCH 3/7] phy: berlin-sata: add missing of_node_put Julia Lawall <Julia.Lawall@lip6.fr> - 2015-11-16 12:50 +0100
    Re: [PATCH 3/7] phy: berlin-sata: add missing of_node_put Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> - 2015-11-19 21:50 +0100
  [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put Julia Lawall <Julia.Lawall@lip6.fr> - 2015-11-16 12:50 +0100
    Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put Brian Norris <computersforpeace@gmail.com> - 2015-11-17 02:40 +0100
      Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put Julia Lawall <julia.lawall@lip6.fr> - 2015-11-17 07:20 +0100
        Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put Julia Lawall <julia.lawall@lip6.fr> - 2015-11-17 18:50 +0100
          Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put Brian Norris <computersforpeace@gmail.com> - 2015-11-17 19:40 +0100
            Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put Brian Norris <computersforpeace@gmail.com> - 2015-11-17 19:40 +0100
            Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put Julia Lawall <julia.lawall@lip6.fr> - 2015-11-17 23:40 +0100
              device_node lifetime (was: Re: [PATCH 1/7] phy: brcmstb-sata: add  missing of_node_put) Brian Norris <computersforpeace@gmail.com> - 2015-11-18 20:10 +0100
                Re: device_node lifetime (was: Re: [PATCH 1/7] phy: brcmstb-sata:  add missing of_node_put) Julia Lawall <julia.lawall@lip6.fr> - 2015-11-18 21:50 +0100
                Re: device_node lifetime (was: Re: [PATCH 1/7] phy: brcmstb-sata: add  missing of_node_put) Rob Herring <robh@kernel.org> - 2015-11-19 19:50 +0100
                Re: device_node lifetime (was: Re: [PATCH 1/7] phy: brcmstb-sata:  add missing of_node_put) Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-11-19 20:20 +0100
        Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put Brian Norris <computersforpeace@gmail.com> - 2015-11-17 18:50 +0100
      Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put Kishon Vijay Abraham I <kishon@ti.com> - 2015-11-27 15:20 +0100
  [PATCH 7/7] phy: cygnus: pcie: add missing of_node_put Julia Lawall <Julia.Lawall@lip6.fr> - 2015-11-16 12:50 +0100
    Re: [PATCH 7/7] phy: cygnus: pcie: add missing of_node_put Ray Jui <rjui@broadcom.com> - 2015-11-16 18:20 +0100

csiph-web