lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070627105907.GA1802@darkstar.te-china.tietoenator.com>
Date:	Wed, 27 Jun 2007 10:59:07 +0000
From:	Dave Young <hidave.darkstar@...il.com>
To:	dmitry.torokhov@...il.com
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH] atkbd: cleanup only once

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@...il.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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ