summaryrefslogtreecommitdiffstats
path: root/drivers/isdn/mISDN/timerdev.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-04-15 23:27:11 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2013-04-29 21:41:49 +0200
commit89b107adce32a52920b36787b60c8f24c986c526 (patch)
treeeeea368105afe8ef59653a56748ec248a35ca449 /drivers/isdn/mISDN/timerdev.c
parentmISDN: fix mISDN_read()/mISDN_read() race (diff)
downloadlinux-89b107adce32a52920b36787b60c8f24c986c526.tar.xz
linux-89b107adce32a52920b36787b60c8f24c986c526.zip
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>
Diffstat (limited to 'drivers/isdn/mISDN/timerdev.c')
-rw-r--r--drivers/isdn/mISDN/timerdev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/isdn/mISDN/timerdev.c b/drivers/isdn/mISDN/timerdev.c
index da2aa376a3a3..9438d7ec3308 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,