diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-15 17:27:11 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-29 15:41:49 -0400 |
commit | 89b107adce32a52920b36787b60c8f24c986c526 (patch) | |
tree | eeea368105afe8ef59653a56748ec248a35ca449 | |
parent | ebb06be16bc9a1e66a010ca50c75c5128bafb4b1 (diff) | |
download | op-kernel-dev-89b107adce32a52920b36787b60c8f24c986c526.zip op-kernel-dev-89b107adce32a52920b36787b60c8f24c986c526.tar.gz |
mISDN: grabbing/dropping reference to THIS_MODULE in open/release is racy
... when you have no ->owner set.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | drivers/isdn/mISDN/timerdev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/isdn/mISDN/timerdev.c b/drivers/isdn/mISDN/timerdev.c index da2aa37..9438d7e 100644 --- a/drivers/isdn/mISDN/timerdev.c +++ b/drivers/isdn/mISDN/timerdev.c @@ -64,7 +64,6 @@ mISDN_open(struct inode *ino, struct file *filep) dev->work = 0; init_waitqueue_head(&dev->wait); filep->private_data = dev; - __module_get(THIS_MODULE); return nonseekable_open(ino, filep); } @@ -94,7 +93,6 @@ mISDN_close(struct inode *ino, struct file *filep) kfree(timer); } kfree(dev); - module_put(THIS_MODULE); return 0; } @@ -269,6 +267,7 @@ mISDN_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) } static const struct file_operations mISDN_fops = { + .owner = THIS_MODULE, .read = mISDN_read, .poll = mISDN_poll, .unlocked_ioctl = mISDN_ioctl, |