From: Jiri Slaby <jirislaby@gmail.com>
To: Andrew Morton <akpm@osdl.org>
Cc: <linux-kernel@vger.kernel.org>
Cc: <osv@javad.com>
Subject: [PATCH 1/3] Char: mxser, fix oops when removing opened
Date: Fri, 22 Dec 2006 23:50:50 +0100 (CET) [thread overview]
Message-ID: <2548619677109123490@wsc.cz> (raw)
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>
---
commit e3a36e41f423af467a95221598fd5754a8fb4032
tree b78cc8a59cb41f27781d115e285c447cf913a889
parent 5df5a993999b94d728cedfa669eba2b0b58e16d7
author Jiri Slaby <jirislaby@gmail.com> Fri, 22 Dec 2006 22:48:24 +0059
committer Jiri Slaby <jirislaby@gmail.com> Fri, 22 Dec 2006 22:48:24 +0059
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;
next reply other threads:[~2006-12-22 22:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-22 22:50 Jiri Slaby [this message]
2006-12-22 22:51 ` [PATCH 2/3] Char: mxser_new, mark init functions Jiri Slaby
2006-12-22 22:51 ` [PATCH 3/3] Char: mxser_new, remove useless spinlock Jiri Slaby
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2548619677109123490@wsc.cz \
--to=jirislaby@gmail.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®