Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752305AbdHCXYT (ORCPT ); Thu, 3 Aug 2017 19:24:19 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:38404 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751754AbdHCXSI (ORCPT ); Thu, 3 Aug 2017 19:18:08 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Laurent Vivier , David Gibson , Michael Ellerman Subject: [PATCH 4.12 08/31] powerpc/pseries: Fix of_node_put() underflow during reconfig remove Date: Thu, 3 Aug 2017 16:17:38 -0700 Message-Id: <20170803231737.550924695@linuxfoundation.org> X-Mailer: git-send-email 2.13.4 In-Reply-To: <20170803231737.202188456@linuxfoundation.org> References: <20170803231737.202188456@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1166 Lines: 37 4.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Laurent Vivier commit 4fd1bd443e80b12f0a01a45fb9a793206b41cb72 upstream. As for commit 68baf692c435 ("powerpc/pseries: Fix of_node_put() underflow during DLPAR remove"), the call to of_node_put() must be removed from pSeries_reconfig_remove_node(). dlpar_detach_node() and pSeries_reconfig_remove_node() both call of_detach_node(), and thus the node should not be released in both cases. Fixes: 0829f6d1f69e ("of: device_node kobject lifecycle fixes") Signed-off-by: Laurent Vivier Reviewed-by: David Gibson Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/platforms/pseries/reconfig.c | 1 - 1 file changed, 1 deletion(-) --- a/arch/powerpc/platforms/pseries/reconfig.c +++ b/arch/powerpc/platforms/pseries/reconfig.c @@ -82,7 +82,6 @@ static int pSeries_reconfig_remove_node( of_detach_node(np); of_node_put(parent); - of_node_put(np); /* Must decrement the refcount */ return 0; }