From: Andrea Righi 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 Cc: Haavard Skinnemoen Signed-off-by: Andrew Morton --- arch/avr32/mm/fault.c | 2 +- x86_64/mm/fault.c | 0 2 files changed, 1 insertion(+), 1 deletion(-) diff -puN arch/avr32/mm/fault.c~avr32-ratelimit-segfault-reporting-rate arch/avr32/mm/fault.c --- a/arch/avr32/mm/fault.c~avr32-ratelimit-segfault-reporting-rate +++ a/arch/avr32/mm/fault.c @@ -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, diff -puN arch/x86_64/mm/fault.c~avr32-ratelimit-segfault-reporting-rate arch/x86_64/mm/fault.c _