aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiu, Changcheng <[email protected]>2017-11-17 15:28:20 -0800
committerLinus Torvalds <[email protected]>2017-11-17 16:10:02 -0800
commit2f9b7e08cb27d6d8d4579bb5301fb0940ff63d19 (patch)
tree9d2db1875e418a13b04167f53056da29f6d72f35
parent36a3d1dd4e16bcd0d2ddfb4a2ec7092f0ae0d931 (diff)
lib/nmi_backtrace.c: fix kernel text address leak
Don't leak idle function address in NMI backtrace. Link: http://lkml.kernel.org/r/20171106165648.GA95243@sofia Signed-off-by: Liu Changcheng <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Reviewed-by: Josh Poimboeuf <[email protected]> Reviewed-by: Sergey Senozhatsky <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--lib/nmi_backtrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/nmi_backtrace.c b/lib/nmi_backtrace.c
index 46e4c749e4eb..61a6b5aab07e 100644
--- a/lib/nmi_backtrace.c
+++ b/lib/nmi_backtrace.c
@@ -93,8 +93,8 @@ bool nmi_cpu_backtrace(struct pt_regs *regs)
if (cpumask_test_cpu(cpu, to_cpumask(backtrace_mask))) {
arch_spin_lock(&lock);
if (regs && cpu_in_idle(instruction_pointer(regs))) {
- pr_warn("NMI backtrace for cpu %d skipped: idling at pc %#lx\n",
- cpu, instruction_pointer(regs));
+ pr_warn("NMI backtrace for cpu %d skipped: idling at %pS\n",
+ cpu, (void *)instruction_pointer(regs));
} else {
pr_warn("NMI backtrace for cpu %d\n", cpu);
if (regs)