login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
June
»
28
Re: [PATCH] atkbd: cleanup only once
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: dave young
Subject:
Re: [PATCH] atkbd: cleanup only once
Date: Wednesday, June 27, 2007 - 11:12 pm
>2007/6/28, Dmitry Torokhov <dtor@insightbb.com>:
quoted text
> On Wednesday 27 June 2007 01:02, dave young wrote: > > 2007/6/27, Dmitry Torokhov <dtor@insightbb.com>: > > > On Wednesday 27 June 2007 00:28, Greg KH wrote: > > > > On Wed, Jun 27, 2007 at 12:34:09AM -0400, Dmitry Torokhov wrote: > > > > > 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 <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; > > > > > > > > > > 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? > > > > > > > > There was never anything stopping that from happening before. No driver > > > > core code was using that rwsem, so it wasn't protecting anything, > > > > despite people trying to use it as if it was :) > > > > > > > > > > It did protect device_shutdown() from itself, didn't it? > > > > > > -- > > > Dmitry > > > > > how about check ps2dev->serio in ps2_command before use it? > > I don't think we ever set it to NULL. Does the patch below help any? > > -- > Dmitry > > > Signed-off-by: Dmitry Torokhov <dtor@mail.ru> > --- > > drivers/input/serio/serio.c | 2 ++ > 1 files changed, 2 insertions(+) > > Index: work/drivers/input/serio/serio.c > =================================================================== > --- work.orig/drivers/input/serio/serio.c > +++ work/drivers/input/serio/serio.c > @@ -769,8 +769,10 @@ static int serio_driver_remove(struct de > > static void serio_cleanup(struct serio *serio) > { > + mutex_lock(&serio->drv_mutex); > if (serio->drv && serio->drv->cleanup) > serio->drv->cleanup(serio); > + mutex_unlock(&serio->drv_mutex); > } > > static void serio_shutdown(struct device *dev) >
Yes, l tested with this patch, looks good to me. Regards dave -
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
Re: [PATCH] atkbd: cleanup only once
, dave young
, (Tue Jun 26, 8:01 pm)
Re: [PATCH] atkbd: cleanup only once
, Greg KH
, (Tue Jun 26, 9:28 pm)
Re: [PATCH] atkbd: cleanup only once
, Dmitry Torokhov
, (Tue Jun 26, 9:34 pm)
Re: [PATCH] atkbd: cleanup only once
, Dmitry Torokhov
, (Tue Jun 26, 9:59 pm)
Re: [PATCH] atkbd: cleanup only once
, dave young
, (Tue Jun 26, 10:02 pm)
Re: [PATCH] atkbd: cleanup only once
, Greg KH
, (Tue Jun 26, 10:27 pm)
[PATCH] atkbd: cleanup only once
, Dave Young
, (Wed Jun 27, 3:59 am)
Re: [PATCH] atkbd: cleanup only once
, Dmitry Torokhov
, (Wed Jun 27, 6:37 am)
Re: [PATCH] atkbd: cleanup only once
, Dmitry Torokhov
, (Wed Jun 27, 10:18 pm)
Re: [PATCH] atkbd: cleanup only once
, dave young
, (Wed Jun 27, 11:12 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Kay Sievers
Re: char/tpm: tpm_infineon no longer loaded for HP 2510p laptop
Eric W. Biederman
[PATCH 8/8] sysfs: user namespaces: fix bug with clone(CLONE_NEWUSER) with fairsched
S K
Re: cpufreq doesn't seem to work in Intel Q9300
Bart Van Assche
Re: Is gcc thread-unsafe?
Greg Kroah-Hartman
[PATCH 20/36] Driver core: Call device_pm_add() after bus_add_device() in device_a...
git
:
Junio C Hamano
Re: git-svnimport
Junio C Hamano
Re: [PATCH] git-mv: Keep moved index entries inact
Johannes Schindelin
Re: [PATCH] Fix approxidate("never") to always return 0
A Large Angry SCM
Re: [RFC] origin link for cherry-pick and revert
Gabriel
[PATCH] When a remote is added but not fetched, tell the user.
linux-netdev
:
Daniel Lezcano
getsockopt(TCP_DEFER_ACCEPT) value change
David Miller
Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a seco...
Ingo Molnar
Re: [regression] nf_iterate(), BUG: unable to handle kernel NULL pointer dereference
Eric W. Biederman
[PATCH 14/20] net: Simplify pppol2tp pernet operations.
Jeff Kirsher
[net-2.6 PATCH 2/5] e1000e: increase swflag acquisition timeout for ICHx/PCH
git-commits-head
:
Linux Kernel Mailing List
ath9k_htc: Allocate URBs properly
Linux Kernel Mailing List
sm501: add power control callback
Linux Kernel Mailing List
MIPS: Cavium: Remove unused watchdog code.
Linux Kernel Mailing List
V4L/DVB (8976): af9015: Add USB ID for AVerMedia A309
Linux Kernel Mailing List
ARM: 5670/1: bcmring: add default configuration for bcmring arch
openbsd-misc
:
daniele.pilenga
snmpd hangs on 4.1 looking up hrSWRunTable
Jason Dixon
Re: any web management gui for pf ?
Christophe Rioux
Implementation example of snmp
Nick Holland
Re: booting openbsd on eee without cd-rom
Bryan Irvine
Re: OpenBSD 4.7 Released, May 19 2010
Colocation donated by:
Syndicate