diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2006-12-29 19:47:34 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-30 13:55:55 -0500 |
commit | 31f87cf48d54f5930e6e8e827989c18b0069c94a (patch) | |
tree | 7a9c9892a934aa41cd68bc3006500ed7d9a9efc3 /drivers/char/mxser.c | |
parent | 76e6a1d6607e5b58003bb87e3b3220d5fdb7568d (diff) |
[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: <osv@javad.com>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/mxser.c')
-rw-r--r-- | drivers/char/mxser.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index c063359baf78..83f604b19290 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c | |||
@@ -717,6 +717,7 @@ static int mxser_init(void) | |||
717 | 717 | ||
718 | /* Initialize the tty_driver structure */ | 718 | /* Initialize the tty_driver structure */ |
719 | memset(mxvar_sdriver, 0, sizeof(struct tty_driver)); | 719 | memset(mxvar_sdriver, 0, sizeof(struct tty_driver)); |
720 | mxvar_sdriver->owner = THIS_MODULE; | ||
720 | mxvar_sdriver->magic = TTY_DRIVER_MAGIC; | 721 | mxvar_sdriver->magic = TTY_DRIVER_MAGIC; |
721 | mxvar_sdriver->name = "ttyMI"; | 722 | mxvar_sdriver->name = "ttyMI"; |
722 | mxvar_sdriver->major = ttymajor; | 723 | mxvar_sdriver->major = ttymajor; |