1
0
Fork 0

Input: keyboard handler - use printk_ratelimit()

Use printk_ratelimit() to protect ourselves from buggy drivers or
devices endlessly generating invalid events.

Suggested by Andrew Morton.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
hifive-unleashed-5.1
Dmitry Torokhov 2007-04-12 01:30:52 -04:00
parent 887cc12723
commit 9e35d20663
1 changed files with 1 additions and 1 deletions

View File

@ -1135,7 +1135,7 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw)
if ((raw_mode = (kbd->kbdmode == VC_RAW)) && !hw_raw)
if (emulate_raw(vc, keycode, !down << 7))
if (keycode < BTN_MISC)
if (keycode < BTN_MISC && printk_ratelimit())
printk(KERN_WARNING "keyboard.c: can't emulate rawmode for keycode %d\n", keycode);
#ifdef CONFIG_MAGIC_SYSRQ /* Handle the SysRq Hack */