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 /drivers/isdn | |
parent | ebb06be16bc9a1e66a010ca50c75c5128bafb4b1 (diff) |
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')
-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 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) | |||
64 | dev->work = 0; | 64 | dev->work = 0; |
65 | init_waitqueue_head(&dev->wait); | 65 | init_waitqueue_head(&dev->wait); |
66 | filep->private_data = dev; | 66 | filep->private_data = dev; |
67 | __module_get(THIS_MODULE); | ||
68 | return nonseekable_open(ino, filep); | 67 | return nonseekable_open(ino, filep); |
69 | } | 68 | } |
70 | 69 | ||
@@ -94,7 +93,6 @@ mISDN_close(struct inode *ino, struct file *filep) | |||
94 | kfree(timer); | 93 | kfree(timer); |
95 | } | 94 | } |
96 | kfree(dev); | 95 | kfree(dev); |
97 | module_put(THIS_MODULE); | ||
98 | return 0; | 96 | return 0; |
99 | } | 97 | } |
100 | 98 | ||
@@ -269,6 +267,7 @@ mISDN_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) | |||
269 | } | 267 | } |
270 | 268 | ||
271 | static const struct file_operations mISDN_fops = { | 269 | static const struct file_operations mISDN_fops = { |
270 | .owner = THIS_MODULE, | ||
272 | .read = mISDN_read, | 271 | .read = mISDN_read, |
273 | .poll = mISDN_poll, | 272 | .poll = mISDN_poll, |
274 | .unlocked_ioctl = mISDN_ioctl, | 273 | .unlocked_ioctl = mISDN_ioctl, |