]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[AVR32] ratelimit segfault reporting rate
authorAndrea Righi <righiandr@users.sourceforge.net>
Wed, 23 May 2007 21:14:52 +0000 (14:14 -0700)
committerHaavard Skinnemoen <hskinnemoen@atmel.com>
Thu, 14 Jun 2007 16:30:49 +0000 (18:30 +0200)
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>
arch/avr32/mm/fault.c

index e011f1ce1875f500507638e6317f8a66d9061c7a..4b2495285d948246372c91aa06f37ed893ad992d 100644 (file)
@@ -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,