From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 155B7C282CD for ; Mon, 28 Jan 2019 16:33:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D236D20663 for ; Mon, 28 Jan 2019 16:33:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548693184; bh=eTEmKxgmC6+wG87loMUu5xm36Z1oWKvJhjUnn2qlP5w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ENUeK0QuyFCgNpa00f8VI5Bb3Q9cNVMyL79ziTL7R9OWsDUC0lrOqQG0i51xrEvlh 88jb298obqcrBeWVxDs1d0DILfYmQnA4EBieVDk5K4VLa5YR3m2KHoq/GFVoRiFqqd AoM23jm8FRa9vS2DbVvZwfUwuJXbjl34ufbw/12w= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390452AbfA1QdD (ORCPT ); Mon, 28 Jan 2019 11:33:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:35936 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390235AbfA1Q0e (ORCPT ); Mon, 28 Jan 2019 11:26:34 -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 92FFA2171F; Mon, 28 Jan 2019 16:26:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548692794; bh=eTEmKxgmC6+wG87loMUu5xm36Z1oWKvJhjUnn2qlP5w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U+Cmd3AwH/yjyRII6beJRK+nHm2tAqS/ZE4V3GC1N7CvZ/Lp/EKr+ML89LKaJld9z 09IZYdjqf974zZ8QHBd/OiSjH8A2fGiTMnLdV0nMQsg6bU5ILfOO5Ra01AL9p6m4KS I8viwOgby51M5doaNWnc6OWbYwWoNVnLU+2YW56g= 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 3.18 07/61] powerpc/pseries: add of_node_put() in dlpar_detach_node() Date: Mon, 28 Jan 2019 11:25:29 -0500 Message-Id: <20190128162623.59854-7-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128162623.59854-1-sashal@kernel.org> References: <20190128162623.59854-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 80d175dca68e..85bd29475987 100644 --- a/arch/powerpc/platforms/pseries/dlpar.c +++ b/arch/powerpc/platforms/pseries/dlpar.c @@ -299,6 +299,8 @@ int dlpar_detach_node(struct device_node *dn) if (rc) return rc; + of_node_put(dn); + return 0; } -- 2.19.1