Commit 126187f1 authored by Andrea Righi's avatar Andrea Righi Committed by Haavard Skinnemoen

[AVR32] ratelimit segfault reporting rate

Limit the rate of the kernel logging for the segfaults of user
applications, to avoid potential message floods or denial-of-service
attacks.
Signed-off-by: default avatarAndrea Righi <a.righi@cineca.it>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarHaavard Skinnemoen <hskinnemoen@atmel.com>
parent eedab661
......@@ -158,7 +158,7 @@ bad_area:
up_read(&mm->mmap_sem);
if (user_mode(regs)) {
if (exception_trace)
if (exception_trace && printk_ratelimit())
printk("%s%s[%d]: segfault at %08lx pc %08lx "
"sp %08lx ecr %lu\n",
is_init(tsk) ? KERN_EMERG : KERN_INFO,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment