mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
[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: Andrea Righi <a.righi@cineca.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
This commit is contained in:
parent
eedab661a5
commit
126187f1e0
1 changed files with 1 additions and 1 deletions
|
@ -158,7 +158,7 @@ asmlinkage void do_page_fault(unsigned long ecr, struct pt_regs *regs)
|
|||
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,
|
||||
|
|
Loading…
Reference in a new issue