Skip to content

Commit

Permalink
[AVR32] ratelimit segfault reporting rate
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrea Righi authored and Haavard Skinnemoen committed Jun 14, 2007
1 parent eedab66 commit 126187f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/avr32/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 126187f

Please sign in to comment.