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.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 D7043C169C4 for ; Mon, 11 Feb 2019 16:14:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9CEFA21B1C for ; Mon, 11 Feb 2019 16:14:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549901660; bh=INtSNUFjJaP8CghPEeRNdJdyynnJ0s3F7VOxGbqoK6E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=foXbcccB2YboT0etnClRfzCNmiEB3dVpQAR6Z45wSZarLqo6vWpHDhresei3gQI+n SCsysf/jbPOdHkow3joDNngJ1QpwUqua7olTSnncXg5uTuDwSwQjNdX4ygVrcCWGaM jTgjMDe5t+8QUVi5UylCT4H4pz4/jfRO3HmdoGy0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727671AbfBKOVl (ORCPT ); Mon, 11 Feb 2019 09:21:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:54492 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728562AbfBKOVj (ORCPT ); Mon, 11 Feb 2019 09:21:39 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9C296222A1; Mon, 11 Feb 2019 14:21:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549894899; bh=INtSNUFjJaP8CghPEeRNdJdyynnJ0s3F7VOxGbqoK6E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oegfMNgaTC3NvUVlMmzJnEwShfGtngbv+K93rFw/NVpqklScH/PbIQZXji6V/lNZv wpuXjGpbF12SDeh3rdmuxrEWL3Yi5k/VtgmMElml1Sm/fIESc9+yOlTbDkFsyKh+aj PJHDOvcHXNoOej0dcK9lDIJEtZHRsdAolFOqSgEI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alan Tull , Michael Ellerman , Frank Rowand , Sasha Levin Subject: [PATCH 4.20 026/352] powerpc/pseries: add of_node_put() in dlpar_detach_node() Date: Mon, 11 Feb 2019 15:14:13 +0100 Message-Id: <20190211141848.009449972@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ 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 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; } -- 2.19.1