From: Andrea Righi Date: Wed, 23 May 2007 21:14:52 +0000 (-0700) Subject: [AVR32] ratelimit segfault reporting rate X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=126187f1e00048abec4d4a2eb3eeae396fbaa944;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [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 Signed-off-by: Andrew Morton Signed-off-by: Haavard Skinnemoen --- diff --git a/arch/avr32/mm/fault.c b/arch/avr32/mm/fault.c index e011f1ce1875..4b2495285d94 100644 --- a/arch/avr32/mm/fault.c +++ b/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,