From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id A56C51A0D16 for ; Fri, 30 Jan 2015 15:09:04 +1100 (AEDT) In-Reply-To: <1421243519-6257-2-git-send-email-geert+renesas@glider.be> To: Geert Uytterhoeven , Benjamin Herrenschmidt , Bryan Wu , Richard Purdie , Jingoo Han , Lee Jones From: Michael Ellerman Subject: Re: [1/3] powerpc/pmac: Fix DT refcount imbalance in pmac_pic_probe_oldstyle Message-Id: <20150130040904.8F89D1402A7@ozlabs.org> Date: Fri, 30 Jan 2015 15:09:04 +1100 (AEDT) Cc: devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, 2015-14-01 at 13:51:57 UTC, Geert Uytterhoeven wrote: > of_find_node_by_name() calls of_node_put() on its "from" parameter, > which must not be done on "master", as it's still in use, and will be > released manually later. This may cause a zero kref refcount. > Use of_get_child_by_name() instead to fix this. But of_find_node_by_name() searches *all* nodes, not just the children of the parameter. So this is a logic change AFAICS, and I have no idea what machines we'd need to test on to check it. So I think an of_node_get(master) would be safer and also fix the refcounting. cheers