powerpc/pseries: Fix of_node_put() underflow during reconfig remove
authorLaurent Vivier <lvivier@redhat.com>
Fri, 21 Jul 2017 14:51:39 +0000 (16:51 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 26 Jul 2017 06:41:53 +0000 (16:41 +1000)
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")
Cc: stable@vger.kernel.org # v3.15+
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/pseries/reconfig.c

index e5bf1e84047f4c3fb9746ae85b0c6593f47ab012..011ef2180fe6b8d85f4fa11a1b31e8636e29d617 100644 (file)
@@ -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;
 }