powerpc/numa: Fix OF node refcounting bug
authorGavin Shan <shangw@linux.vnet.ibm.com>
Wed, 30 May 2012 17:07:29 +0000 (17:07 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 3 Jul 2012 04:14:44 +0000 (14:14 +1000)
The form affinity for NUMA is set to 1 if the firmware supports
OPAL. Otherwise, we have to retrieve that from OF node "/chosen".
For the latter case, OF node "/chosen" reference count was never
decreased.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/mm/numa.c

index 6e8f677f5646e4c66c801b3bc670c615e880c5b9..7c28589d45bd8bd1d0690c8cdc7a41feab2f25bc 100644 (file)
@@ -340,6 +340,8 @@ static int __init find_min_common_depth(void)
                                dbg("Using form 1 affinity\n");
                                form1_affinity = 1;
                        }
+
+                       of_node_put(chosen);
                }
        }