Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161283AbbKSTOo (ORCPT ); Thu, 19 Nov 2015 14:14:44 -0500 Received: from pandora.arm.linux.org.uk ([78.32.30.218]:40856 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161162AbbKSTOm (ORCPT ); Thu, 19 Nov 2015 14:14:42 -0500 Date: Thu, 19 Nov 2015 19:14:28 +0000 From: Russell King - ARM Linux To: Rob Herring Cc: Brian Norris , Julia Lawall , Kishon Vijay Abraham I , kernel-janitors@vger.kernel.org, Gregory Fong , Florian Fainelli , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Thomas Petazzoni , Andrew Lunn , Bjorn Helgaas , Jason Cooper , "devicetree@vger.kernel.org" Subject: Re: device_node lifetime (was: Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put) Message-ID: <20151119191428.GB8644@n2100.arm.linux.org.uk> References: <1447673600-8881-1-git-send-email-Julia.Lawall@lip6.fr> <1447673600-8881-2-git-send-email-Julia.Lawall@lip6.fr> <20151117013830.GV8456@google.com> <20151117174430.GA8456@google.com> <20151117183036.GF8456@google.com> <20151118190500.GE140057@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2264 Lines: 47 On Thu, Nov 19, 2015 at 12:44:11PM -0600, Rob Herring wrote: > On Wed, Nov 18, 2015 at 1:05 PM, Brian Norris > 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. -- 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/