Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2725865imj; Mon, 11 Feb 2019 07:33:59 -0800 (PST) X-Google-Smtp-Source: AHgI3IZaemimdl1pq8lYgYMsEiF4/mgoJD4WYQZqN23WHHWXgAUQloGzVISgRfryVs3wG5v+ouOx X-Received: by 2002:a17:902:a50a:: with SMTP id s10mr36339878plq.278.1549899239406; Mon, 11 Feb 2019 07:33:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549899239; cv=none; d=google.com; s=arc-20160816; b=uECpDLAjwmYvywaY68P8aiB9ZwKZfH7ZL4lQFYGkZ1N/aKPK3KNJ9yzJNCQwShsqah TRDSrayFRhf/WFXDUtOANvCey76e/QOY6nBOQfr/NUS4X8lakG/DLS9lF6gWr3qpdN+x 0OPORDp2VedrIQ/KoGf6UlJAuCsvc4pe1U3ZSXU8iUfVEDnThR9NpzB2H9bcpeCzPmwV 9yh38RfifiK0hXFloFxqBYtO1I73Zxy23gLh654hnwlUkCz8s/FmiaC5M/eicShBwap3 PM9ZcRIvpXiNGJDCv+bPPdzONpQ+xrh0fyWzPx9i4rVJMFvBPshsy6uNWYORuaTzb9qu VQmw== 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=JKhsLHX7ydpf9CFTjIbjnxJtEt4Xyl59pwKP8LeUSIw=; b=y0/Udq99cZl6lnsuU9SGfBcXX4OwEQkRZMLm2YxFSsPzr3ZdzpsF7+Sfeo08/673Xi DdXWC9I/4bxQM2FdkxNVus1D5HL/GnxfqzYcZLMr3ok4xvByX0j7/FdDLCUyvtbE5xtQ +6ljPtSM+jZZ3hYdRWMtcn4wAFWF5D1ibZS6kuvFvElwbUhp68yDje5eP7C6UKqI3G2e 0Y8Z63TYaabx0U5RadeEWD+cqHqLu2FwTZyht76CnKrO2eeXlQFWX8rlDqYWzzrxm7U5 w5oOIOTov+3Xp3RCC5tC5xb3Pca1kYm2ugJyBgBbT2ywivjLFjPHZMWUfDLM7s4AyVCL E0Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UvdgMQIJ; 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 j21si10493597pll.150.2019.02.11.07.33.43; Mon, 11 Feb 2019 07:33:59 -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=UvdgMQIJ; 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 S2388728AbfBKPcp (ORCPT + 99 others); Mon, 11 Feb 2019 10:32:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:41214 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388401AbfBKOy3 (ORCPT ); Mon, 11 Feb 2019 09:54:29 -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 F1F432229E; Mon, 11 Feb 2019 14:54:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549896868; bh=fzEglJfLX+DZkiLUlj/L1NaD9D4Blx3An39VcSpAoFU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UvdgMQIJrqfqNVm9JncDdm0gsp5SJR0DMwQPOEkqL9nmkMCUbK4A7qHzu/bwkLmH/ 7Avw7QOs7gIoT+gJTWq7tutLWTpqShDVjQ4WoPjnc+p2XEj/VZGmP0T4QLAnfTq0A0 WW9DyYA5c+5UUUegQVF/17I00x5kmfN4Pli28ZQQ= 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.14 015/205] powerpc/pseries: add of_node_put() in dlpar_detach_node() Date: Mon, 11 Feb 2019 15:16:53 +0100 Message-Id: <20190211141828.149805362@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141827.214852402@linuxfoundation.org> References: <20190211141827.214852402@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.14-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 e9149d05d30b..f4e6565dd7a9 100644 --- a/arch/powerpc/platforms/pseries/dlpar.c +++ b/arch/powerpc/platforms/pseries/dlpar.c @@ -284,6 +284,8 @@ int dlpar_detach_node(struct device_node *dn) if (rc) return rc; + of_node_put(dn); + return 0; } -- 2.19.1