projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e43ba9
)
arm64: perf: Don't use of_node after putting it
author
Stephen Boyd
<sboyd@codeaurora.org>
Wed, 3 Jun 2015 20:53:37 +0000
(21:53 +0100)
committer
Catalin Marinas
<catalin.marinas@arm.com>
Tue, 30 Jun 2015 17:13:03 +0000
(18:13 +0100)
It's possible, albeit unlikely, that using the of_node here will
reference freed memory. Call of_node_put() after printing the
name to be safe.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/perf_event.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/arm64/kernel/perf_event.c
b/arch/arm64/kernel/perf_event.c
index 702591f6180a8d50704648977ff48e4f6811880d..8af7784a8e3505d49d62b9c626c493dbdf7b280d 100644
(file)
--- a/
arch/arm64/kernel/perf_event.c
+++ b/
arch/arm64/kernel/perf_event.c
@@
-1340,12
+1340,13
@@
static int armpmu_device_probe(struct platform_device *pdev)
if (arch_find_n_match_cpu_physical_id(dn, cpu, NULL))
break;
- of_node_put(dn);
if (cpu >= nr_cpu_ids) {
pr_warn("Failed to find logical CPU for %s\n",
dn->name);
+ of_node_put(dn);
break;
}
+ of_node_put(dn);
irqs[i] = cpu;
}