Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-09-01 14:30:54 +0200
committerTakashi Iwai <tiwai@suse.de>2017-09-01 14:30:54 +0200
commit85acde11d7c307cbea0496cb14d7f81ecc601777 (patch)
treec142e808e2ba46bb7a212ca4f1a924fb0b30e547
parent668870500ac0d83eb27191b6b563f9994dd91c03 (diff)
parent7899c29f8d9757b8276667b687f55c48c49e91f4 (diff)
Merge branch 'SLE12-SP3' into openSUSE-42.3
-rw-r--r--patches.arch/of-fix-cpus-reference-leak-in-of_numa_parse_cpu_node.patch40
-rw-r--r--series.conf1
2 files changed, 41 insertions, 0 deletions
diff --git a/patches.arch/of-fix-cpus-reference-leak-in-of_numa_parse_cpu_node.patch b/patches.arch/of-fix-cpus-reference-leak-in-of_numa_parse_cpu_node.patch
new file mode 100644
index 0000000000..29dccf9397
--- /dev/null
+++ b/patches.arch/of-fix-cpus-reference-leak-in-of_numa_parse_cpu_node.patch
@@ -0,0 +1,40 @@
+From: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
+Date: Mon, 17 Apr 2017 20:29:17 -0400
+Subject: of: fix "/cpus" reference leak in of_numa_parse_cpu_nodes()
+Git-commit: b8475cbee5ab2eac05f9cd5dbcc94c453d3cbf10
+Patch-mainline: v4.12-rc1
+References: bsc#1056827
+
+The call to of_find_node_by_path("/cpus") returns the cpus device_node
+with its reference count incremented. There is no matching of_node_put()
+call in of_numa_parse_cpu_nodes() which results in a leaked reference
+to the "/cpus" node.
+
+This patch adds an of_node_put() to release the reference.
+
+fixes: 298535c00a2c ("of, numa: Add NUMA of binding implementation.")
+Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
+Acked-by: David Daney <david.daney@cavium.com>
+Cc: stable@vger.kernel.org # v4.7+
+Signed-off-by: Rob Herring <robh@kernel.org>
+Signed-off-by: Matthias Brugger <mbrugger@suse.com>
+---
+ drivers/of/of_numa.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c
+index a53982a330ea..2db1f7a04baf 100644
+--- a/drivers/of/of_numa.c
++++ b/drivers/of/of_numa.c
+@@ -57,6 +57,8 @@ static void __init of_numa_parse_cpu_nodes(void)
+ else
+ node_set(nid, numa_nodes_parsed);
+ }
++
++ of_node_put(cpus);
+ }
+
+ static int __init of_numa_parse_memory_nodes(void)
+--
+2.14.0
+
diff --git a/series.conf b/series.conf
index c5ce1876ed..43773d4e47 100644
--- a/series.conf
+++ b/series.conf
@@ -1356,6 +1356,7 @@
patches.arch/arm64-0001-iommu-arm-smmu-Invalidate-TLBs-properly.patch
patches.arch/arm64-0002-iommu-arm-smmu-v2-Add-support-for-16-bit-VMID.patch
patches.arch/arm64-0003-iommu-arm-smmu-v2-Workaround-for-ThunderX-errata-277.patch
+ patches.arch/of-fix-cpus-reference-leak-in-of_numa_parse_cpu_node.patch
# Perf support
patches.arch/arm64-perf-Convert-event-enums-to-defines.patch