aboutsummaryrefslogtreecommitdiff
path: root/drivers/isdn/mISDN
diff options
context:
space:
mode:
authorAl Viro2013-04-15 17:27:11 -0400
committerAl Viro2013-04-29 15:41:49 -0400
commit89b107adce32a52920b36787b60c8f24c986c526 (patch)
treeeeea368105afe8ef59653a56748ec248a35ca449 /drivers/isdn/mISDN
parentebb06be16bc9a1e66a010ca50c75c5128bafb4b1 (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/mISDN')
-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,