Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3056692imu; Wed, 7 Nov 2018 04:25:24 -0800 (PST) X-Google-Smtp-Source: AJdET5dAWc4doBimUTeDHVM0xcet5PCVU/fwoG4oYEeyfDM26pY6Imfjn0uss+Z0at+LRLibhnWn X-Received: by 2002:a63:194f:: with SMTP id 15mr12785pgz.192.1541593524774; Wed, 07 Nov 2018 04:25:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541593524; cv=none; d=google.com; s=arc-20160816; b=SBcawXW0zI9Kohvkd8HfoiDtWQzxZoi5D5kMSun6taVaYxUWWge4OjTEMd6OgvIhk/ u7s4Rpn3qwIFhRFpzwLdUYa/2GaS5suFdmvPeqdGviPLijmgpswFFAIVFPwgAmTlJtRW jjQbC+jLmkt/1vN7FsA1RD15JABYYJIXhxptA5FBOk1RaQ1ip2R/jTTHkCYLtjjjHuDi QiB6ZHxpMd7mEsHeIP6auFawSmU+LTz6vM8XiSTeeVON5BLuHF3DSD2gsnbPJRKsMBzl ViTzr90LBK030k21qIygbg6MU9K47A/255dAP66XAJEsDNAsMfnkqN22vCI/P04/kBdr wUHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=ZtPkHr+30gzL0Y8RKFUnmpOOadqDr5/JGNdLMZKPkME=; b=MmicLPxu1pbeGQG62Tb3WtprpfM5gXhva+YACssjlIMk6pw+di72TfIM0qvzqnAaIH MreWBmiJBtE3QZJcMMqlQ6NOkCi9DKc0n0bIYUBR1sqZXJ+JqPlhnvBN2CIq8DG6lYJR EgZHvpSahkOt6NJ4tg5CPXggu63tmbeY5Wtc8Z8Yr8Zp/5h6BW/igoanwsvS2TfIwsS/ sRgwpxBZNM0RTWt//dlOFoiFsqUMJetbS34eVZcIEbGI6d/lYFvQ1ti6Ld/SO4wVyoOI 5DuE9G4OwPIYYnQ3RkO7dNypJpeir8NkPRMfBDZEEUgsreSnecngVnYxjzSSOZYLixtT bQCw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p3si427813pgi.0.2018.11.07.04.25.09; Wed, 07 Nov 2018 04:25:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730510AbeKGVxl (ORCPT + 99 others); Wed, 7 Nov 2018 16:53:41 -0500 Received: from ozlabs.org ([203.11.71.1]:51285 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726248AbeKGVxl (ORCPT ); Wed, 7 Nov 2018 16:53:41 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 42qlv50QSPz9sCw; Wed, 7 Nov 2018 23:23:29 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au From: Michael Ellerman To: frowand.list@gmail.com, Rob Herring , Pantelis Antoniou , Benjamin Herrenschmidt , Paul Mackerras , Alan Tull , Moritz Fischer Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org, linux-fpga@vger.kernel.org Subject: Re: [PATCH v6 04/18] powerpc/pseries: add of_node_put() in dlpar_detach_node() In-Reply-To: <1541431515-25197-5-git-send-email-frowand.list@gmail.com> References: <1541431515-25197-1-git-send-email-frowand.list@gmail.com> <1541431515-25197-5-git-send-email-frowand.list@gmail.com> Date: Wed, 07 Nov 2018 23:23:27 +1100 Message-ID: <87muqlqdog.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org frowand.list@gmail.com writes: > From: Frank Rowand > > "of: overlay: add missing of_node_get() in __of_attach_node_sysfs" It would be clearer if you said 'The previous commit "of: overlay ..." > added a missing of_node_get() to __of_attach_node_sysfs(). This > results in a refcount imbalance for nodes attached with > dlpar_attach_node(). The calling sequence from dlpar_attach_node() > to __of_attach_node_sysfs() is: > > dlpar_attach_node() > of_attach_node() > __of_attach_node_sysfs() > > Tested-by: Alan Tull > Signed-off-by: Frank Rowand > --- > > ***** UNTESTED. I need people with the affected PowerPC systems > ***** (systems that dynamically allocate and deallocate > ***** devicetree nodes) to test this patch. This looks OK to me in light of the previous patch. Acked-by: Michael Ellerman It also means dlpar_detach_node() is again behaving as described in the comment to of_detach_node(). It would be good to make mention of: Fixes: 68baf692c435 ("powerpc/pseries: Fix of_node_put() underflow during DLPAR remove") Which removed an of_node_put() in the exact same place for different reasons. cheers > diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c > index 7625546caefd..17958043e7f7 100644 > --- a/arch/powerpc/platforms/pseries/dlpar.c > +++ b/arch/powerpc/platforms/pseries/dlpar.c > @@ -270,6 +270,8 @@ int dlpar_detach_node(struct device_node *dn) > if (rc) > return rc; > > + of_node_put(dn); > + > return 0; > } > > -- > Frank Rowand