Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753492AbdGXKmp (ORCPT ); Mon, 24 Jul 2017 06:42:45 -0400 Received: from ozlabs.org ([103.22.144.67]:41301 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752799AbdGXKmh (ORCPT ); Mon, 24 Jul 2017 06:42:37 -0400 From: Michael Ellerman To: Laurent Vivier , linux-kernel@vger.kernel.org Cc: David Gibson , linuxppc-dev@lists.ozlabs.org, Tyrel Datwyler , Thomas Huth Subject: Re: [PATCH] powerpc/pseries: Fix of_node_put() underflow during pseries remove In-Reply-To: <20170721145139.9384-1-lvivier@redhat.com> References: <20170721145139.9384-1-lvivier@redhat.com> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Date: Mon, 24 Jul 2017 20:42:34 +1000 Message-ID: <87tw22jeud.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1205 Lines: 39 Laurent Vivier writes: > 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() call > of_detach_node(), and thus the node should not be released > in this case too. > > Signed-off-by: Laurent Vivier > --- > arch/powerpc/platforms/pseries/reconfig.c | 1 - > 1 file changed, 1 deletion(-) Thanks. I'll spare you the swearing about why we have the same bug in two places. As for the other fix, I'll add: Fixes: 0829f6d1f69e ("of: device_node kobject lifecycle fixes") Cc: stable@vger.kernel.org # v3.15+ cheers > diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c > index e5bf1e8..011ef21 100644 > --- a/arch/powerpc/platforms/pseries/reconfig.c > +++ b/arch/powerpc/platforms/pseries/reconfig.c > @@ -82,7 +82,6 @@ static int pSeries_reconfig_remove_node(struct device_node *np) > > of_detach_node(np); > of_node_put(parent); > - of_node_put(np); /* Must decrement the refcount */ > return 0; > } > > -- > 2.9.4