Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3712135imu; Mon, 28 Jan 2019 09:27:40 -0800 (PST) X-Google-Smtp-Source: ALg8bN7hwetVUdpZcIdiwWylRYecJ7g3NMPxN5lBRsro06+XiafZ3oRj0G9n8F6riNCjWmRL7eJa X-Received: by 2002:a17:902:9006:: with SMTP id a6mr22278512plp.334.1548696460616; Mon, 28 Jan 2019 09:27:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548696460; cv=none; d=google.com; s=arc-20160816; b=Hn7dy6EBn0DoSrn+DrdWts/l4OKB8QWkNtjBVtRiQmMHUT79BkVxCwPbqpB1JEe1fQ wzNHevkkXzRO+7ePfLr9U5QGJBQyi+/SwubVLRkNH0yoW2K5CcJFqDysQhCTHC6BEbVC jCQd/Mwwunmlj27ZIPJGEkevxu2q2YksndJfHXJDVGncnLp4m/oNO+ODtTrqtuC0YXKu YKYNIX1UQCxhhX11FK3pxcbHWm8zrYxdqDLv6GGyLjpEnsyFAaergFdNGvqdFOo1hUX+ F0F50qPG8lZ+6960kvMi49Oye65Q8FoxHGj4CLIw5fQpvRWt0StU4jnCKV5HAyI2v+7C nrfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HnrGjM0sv3T1i9Vio6m3WShvmN5D4HdV1u0dIBFZaIM=; b=XVRtyk8ehrPDAAdbnwZEyj1XDpZRH6hFu4QW8vuT2eAHbwSQ3FdJN/6gr63jFu/aFr yucAJ4o2b0NbJE8JjVxPk7fbaep7GNDzpUbwzJy0/AvP0NKQ9x4dl/WYO65uzxa7pjXJ lmWCDY+6y65y87gsnFyv2/C299Dk5LvDNJiKTvckU6zE3MubPRBh1aLtgVUa4HVq641H frSFUAmbFUKCM/Jj3PGXxuzCegtRBvKn/eRX/Q1L/AXqwRh13Wn0sjLrUvhU1DVG7B73 Of3sqCVbu2nQp8/whXhNWbw+BBk/3tAKrpHECgzFFvbgJECngRQXgDtBsowjgE+d0P4M 1wbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="cZ/941Jl"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e15si32784870pgm.25.2019.01.28.09.27.25; Mon, 28 Jan 2019 09:27:40 -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; dkim=pass header.i=@kernel.org header.s=default header.b="cZ/941Jl"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730806AbfA1QAe (ORCPT + 99 others); Mon, 28 Jan 2019 11:00:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:45776 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730447AbfA1QA3 (ORCPT ); Mon, 28 Jan 2019 11:00:29 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 22D222175B; Mon, 28 Jan 2019 16:00:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691229; bh=FiUeQ9WN+QmxxHZXyoaHNstdzpqLULB+glHW3Mnej4g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cZ/941Jlui3bvo+dqBNZff9N9dPXB/w4URcLIi7ovyhMX9KPOeKrXB/hBRpFSzbBE /bMtbpY7daZtpQkSk6FSDr8Da/WRWEbzbYgm/NZ6vGB2aNIs/ZWd6u9uxr5wFzjgsg /QUcdoZmrOZ8CzenmGMKAyutnY+knOhVWRzyVVkQ= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Frank Rowand , Sasha Levin , linuxppc-dev@lists.ozlabs.org Subject: [PATCH AUTOSEL 4.19 023/258] powerpc/pseries: add of_node_put() in dlpar_detach_node() Date: Mon, 28 Jan 2019 10:55:29 -0500 Message-Id: <20190128155924.51521-23-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Frank Rowand [ Upstream commit 5b3f5c408d8cc59b87e47f1ab9803dbd006e4a91 ] The previous commit, "of: overlay: add missing of_node_get() in __of_attach_node_sysfs" 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() For more detailed description of the node refcount, see commit 68baf692c435 ("powerpc/pseries: Fix of_node_put() underflow during DLPAR remove"). Tested-by: Alan Tull Acked-by: Michael Ellerman Signed-off-by: Frank Rowand Signed-off-by: Sasha Levin --- arch/powerpc/platforms/pseries/dlpar.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c index a0b20c03f078..e3010b14aea5 100644 --- a/arch/powerpc/platforms/pseries/dlpar.c +++ b/arch/powerpc/platforms/pseries/dlpar.c @@ -272,6 +272,8 @@ int dlpar_detach_node(struct device_node *dn) if (rc) return rc; + of_node_put(dn); + return 0; } -- 2.19.1