aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/traps.c
diff options
context:
space:
mode:
authorVladimir Murzin <vladimir.murzin@arm.com>2015-06-19 10:28:03 -0400
committerCatalin Marinas <catalin.marinas@arm.com>2015-06-19 11:26:15 -0400
commit86dca36e6ba019650a94cadf922ea3d06dec0182 (patch)
tree1880f9334e60f0255403b9482cf2fac1d0355479 /arch/arm64/kernel/traps.c
parent9e793ab84ed482047f7226595313f0f3a0aa6854 (diff)
arm64: use private ratelimit state along with show_unhandled_signals
printk_ratelimit() shares the ratelimiting state with other callers what may lead to scenarios where at the time we want to print out debug information we already limited, so nothing appears in the dmesg - this makes exception-trace quite poor helper in debugging. Additionally, we have imbalance with some messages limited with global ratelimit state and other messages limited with their private state defined via pr_*_ratelimited(). To address this inconsistency show_unhandled_signals_ratelimited() macro is introduced and caller sites are converted to use it. Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel/traps.c')
-rw-r--r--arch/arm64/kernel/traps.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
index 1ef2940df13c..a12251c074a8 100644
--- a/arch/arm64/kernel/traps.c
+++ b/arch/arm64/kernel/traps.c
@@ -335,8 +335,7 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs)
335 if (call_undef_hook(regs) == 0) 335 if (call_undef_hook(regs) == 0)
336 return; 336 return;
337 337
338 if (show_unhandled_signals && unhandled_signal(current, SIGILL) && 338 if (show_unhandled_signals_ratelimited() && unhandled_signal(current, SIGILL)) {
339 printk_ratelimit()) {
340 pr_info("%s[%d]: undefined instruction: pc=%p\n", 339 pr_info("%s[%d]: undefined instruction: pc=%p\n",
341 current->comm, task_pid_nr(current), pc); 340 current->comm, task_pid_nr(current), pc);
342 dump_instr(KERN_INFO, regs); 341 dump_instr(KERN_INFO, regs);
@@ -363,7 +362,7 @@ asmlinkage long do_ni_syscall(struct pt_regs *regs)
363 } 362 }
364#endif 363#endif
365 364
366 if (show_unhandled_signals && printk_ratelimit()) { 365 if (show_unhandled_signals_ratelimited()) {
367 pr_info("%s[%d]: syscall %d\n", current->comm, 366 pr_info("%s[%d]: syscall %d\n", current->comm,
368 task_pid_nr(current), (int)regs->syscallno); 367 task_pid_nr(current), (int)regs->syscallno);
369 dump_instr("", regs); 368 dump_instr("", regs);