[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>

authored by Andrea Righi and committed by Haavard Skinnemoen 126187f1 eedab661

+1 -1
+1 -1
arch/avr32/mm/fault.c
··· 158 158 up_read(&mm->mmap_sem); 159 159 160 160 if (user_mode(regs)) { 161 - if (exception_trace) 161 + if (exception_trace && printk_ratelimit()) 162 162 printk("%s%s[%d]: segfault at %08lx pc %08lx " 163 163 "sp %08lx ecr %lu\n", 164 164 is_init(tsk) ? KERN_EMERG : KERN_INFO,