Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=31f87cf48d54f5930e6e8e827989c18b0069c94a
Commit:     31f87cf48d54f5930e6e8e827989c18b0069c94a
Parent:     76e6a1d6607e5b58003bb87e3b3220d5fdb7568d
Author:     Jiri Slaby <[EMAIL PROTECTED]>
AuthorDate: Fri Dec 29 16:47:34 2006 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sat Dec 30 10:55:55 2006 -0800

    [PATCH] Char: mxser, fix oops when removing opened
    
    tty_driver->owner is not set, so if somebody remove mxser_module, it might
    oops (and doesn't tell the user: no way, it's in use). Set the .owner value.
    
    Cc: <[EMAIL PROTECTED]>
    Signed-off-by: Jiri Slaby <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/char/mxser.c     |    1 +
 drivers/char/mxser_new.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
index c063359..83f604b 100644
--- a/drivers/char/mxser.c
+++ b/drivers/char/mxser.c
@@ -717,6 +717,7 @@ static int mxser_init(void)
 
        /* Initialize the tty_driver structure */
        memset(mxvar_sdriver, 0, sizeof(struct tty_driver));
+       mxvar_sdriver->owner = THIS_MODULE;
        mxvar_sdriver->magic = TTY_DRIVER_MAGIC;
        mxvar_sdriver->name = "ttyMI";
        mxvar_sdriver->major = ttymajor;
diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c
index cd989dc..1bb030b 100644
--- a/drivers/char/mxser_new.c
+++ b/drivers/char/mxser_new.c
@@ -2690,6 +2690,7 @@ static int __init mxser_module_init(void)
                MXSER_VERSION);
 
        /* Initialize the tty_driver structure */
+       mxvar_sdriver->owner = THIS_MODULE;
        mxvar_sdriver->magic = TTY_DRIVER_MAGIC;
        mxvar_sdriver->name = "ttyMI";
        mxvar_sdriver->major = ttymajor;
-
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  http://vger.kernel.org/majordomo-info.html

Reply via email to