Commit:     33143ea1a34d12699e6aa222ba124498abcfe4d1
Parent:     9f7a60d6e47a70957e5f6676cfe8c83956b08aa6
Author:     Dmitry Torokhov <[EMAIL PROTECTED]>
AuthorDate: Fri Jun 29 01:06:35 2007 -0400
Committer:  Dmitry Torokhov <[EMAIL PROTECTED]>
CommitDate: Fri Jun 29 01:06:35 2007 -0400

    Input: serio - take drv_mutex in serio_cleanup()
    We need to take serio->drv_mutex in serio_cleanup() to prevent the
    function from being called while driver is in the middle of attaching
    to a serio port. Such situation can happen with i8042 and atkbd drivers
    if user rapidly presses Ctrl-Alt-Del during system startup, and leads
    to kernel oops.
    Reported-by: Dave Young <[EMAIL PROTECTED]>
    Signed-off-by: Dmitry Torokhov <[EMAIL PROTECTED]>
 drivers/input/serio/serio.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
index 5895202..a8f3bc1 100644
--- a/drivers/input/serio/serio.c
+++ b/drivers/input/serio/serio.c
@@ -769,8 +769,10 @@ static int serio_driver_remove(struct device *dev)
 static void serio_cleanup(struct serio *serio)
+       mutex_lock(&serio->drv_mutex);
        if (serio->drv && serio->drv->cleanup)
+       mutex_unlock(&serio->drv_mutex);
 static void serio_shutdown(struct device *dev)
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to