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: Andi Kleen Signed-off-by: Andrew Morton --- arch/x86_64/mm/fault.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) diff -puN arch/avr32/mm/fault.c~x86_64-ratelimit-segfault-reporting-rate arch/avr32/mm/fault.c diff -puN arch/x86_64/mm/fault.c~x86_64-ratelimit-segfault-reporting-rate arch/x86_64/mm/fault.c --- a/arch/x86_64/mm/fault.c~x86_64-ratelimit-segfault-reporting-rate +++ a/arch/x86_64/mm/fault.c @@ -489,7 +489,8 @@ bad_area_nosemaphore: (address >> 32)) return; - if (exception_trace && unhandled_signal(tsk, SIGSEGV)) { + if (exception_trace && unhandled_signal(tsk, SIGSEGV) && + printk_ratelimit()) { printk( "%s%s[%d]: segfault at %016lx rip %016lx rsp %016lx error %lx\n", tsk->pid > 1 ? KERN_INFO : KERN_EMERG, _