lkml.org 
[lkml]   [2007]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] atkbd: cleanup only once
2007/6/27, Dave Young <hidave.darkstar@gmail.com>:
> Hi,
>
> If you press ctrl+alt+del several times as kernel booting (before user level bootin), the kernel will oops. I found the ps2_command is called more than once, then the ps2dev->serio maybe NULL pointer.
>
> 2.6.22-rc5 and 2.6.22-rc6 have same result.
>
> Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
> ---
> diff -upr linux/drivers/input/keyboard/atkbd.c linux.new/drivers/input/keyboard/atkbd.c
> --- linux/drivers/input/keyboard/atkbd.c 2007-06-27 10:38:37.000000000 +0000
> +++ linux.new/drivers/input/keyboard/atkbd.c 2007-06-27 10:37:39.000000000 +0000
> @@ -795,6 +795,11 @@ static int atkbd_activate(struct atkbd *
>
> static void atkbd_cleanup(struct serio *serio)
> {
> + static int flag;
> +
> + if(flag)
> + return;
> + flag = 1;
> struct atkbd *atkbd = serio_get_drvdata(serio);
> ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_BAT);
> }
>
> Regards
> dave
>
attached please find the oops screen image.
[unhandled content-type:image/jpeg]
\
 
 \ /
  Last update: 2007-06-27 05:05    [W:0.035 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site