Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2774039imj; Mon, 11 Feb 2019 08:15:35 -0800 (PST) X-Google-Smtp-Source: AHgI3IZbhpWkvUaR4zjlsrqZmQJxKKOdM0VPctG1CmVxfd6aMVKSDXlJDbjkv1deF7KcvXtveSV4 X-Received: by 2002:a17:902:b114:: with SMTP id q20mr33802643plr.48.1549901734946; Mon, 11 Feb 2019 08:15:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549901734; cv=none; d=google.com; s=arc-20160816; b=p9BD6A47gOk/tWo5XkbDpq19NiY/b/4z0XtU7+t+VTRgVbLkp3Pnm9TUSo8VSNMbN7 R+jHHgrOG2DCGks7wCNgxAuxCmmC4ar3i0lvHOm96Pi/z9C5MObYTMCfeFqfFVhYpzvU 893mvq6iyqWvl0a9mEcKqll6rzgAErlrKnx0rGH8T2l66DbYcZURgl4l8ZEp3RvsAM9J M2MPZyq6bGLUUMuJrHRGc1rHcUrALJHmAQZyQ+7Dh3uN9HnQql5P4/3QF+B001Qh2PCI L1jCtNJsDFFACdgVQzfOI0OllW8ufkxvGZELIpN/sHWgmKOthXeajyDeyTuktNzpycfZ XHgw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VH0fuuG8ZEubZKHc1H8T2SYUIlQyknu+R93e+mZi/L4=; b=tsL95wXDU6YXuPIJTCyes75Le3ZK49Z/TvtrvNJMDnwSE0ANo+M1k0OP3Ouo8GQKaQ 7ImZLDJMfCsw35Y0oEDBqXC2kontQw9ZIBo5Oe+qbChvyQqypvhD2nG6HDFPXVByYaPQ 7MhR4urVoZind8rk74SpRNdJxG1bc5YYqcYtx9+GSuO/74i7LC9CeQ5fZv4SNeJ6hpzy 7qcdpjURsXKKIJIzJoh3C18eSBMts4DrJ+40ZgM2sEv7xr8bY/Vcc4fNIj5c173+WoBj 773GnFnGqVryJL7CLQ7xvt5UGEG+PK4WreezAdZU00b4HAA+gQIxPJIq2kvubVghTZ0N LuJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oegfMNga; 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 z29si10567122pfi.9.2019.02.11.08.15.14; Mon, 11 Feb 2019 08:15:34 -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=oegfMNga; 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 S1727694AbfBKOVn (ORCPT + 99 others); Mon, 11 Feb 2019 09:21:43 -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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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