Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757526AbXF0EeS (ORCPT ); Wed, 27 Jun 2007 00:34:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751711AbXF0EeK (ORCPT ); Wed, 27 Jun 2007 00:34:10 -0400 Received: from gateway.insightbb.com ([74.128.0.19]:45003 "EHLO asav19.insightbb.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751029AbXF0EeJ (ORCPT ); Wed, 27 Jun 2007 00:34:09 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoQrAM+FgUZKhRO4R2dsb2JhbACBT4Vdh3MBARsNBhEB From: Dmitry Torokhov To: Dave Young , Greg KH Subject: Re: [PATCH] atkbd: cleanup only once Date: Wed, 27 Jun 2007 00:34:09 -0400 User-Agent: KMail/1.9.3 Cc: linux-kernel@vger.kernel.org References: <20070627105907.GA1802@darkstar.te-china.tietoenator.com> In-Reply-To: <20070627105907.GA1802@darkstar.te-china.tietoenator.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200706270034.09802.dtor@insightbb.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1576 Lines: 41 Hi Dave, On Wednesday 27 June 2007 06:59, Dave Young wrote: > 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 > --- > 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; Unfortunately this will prevent atkbd from resetting keyboard on 2nd suspend attempt. It will also not work if you have an active MUX and have a couple of keyboards connected. Greg, now that you removed rwsem from subsystem (and subsystem itself for that matter) there is nothing as far as I can see that stops several threads from running device_shutdown() simultaneously. I also do not see what would isolate device probing and shutting them down at the same time. Am I missing something? -- Dmitry - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/