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>
This commit is contained in:
parent
ebb06be16b
commit
89b107adce
1 changed files with 1 additions and 2 deletions
|
@ -64,7 +64,6 @@ mISDN_open(struct inode *ino, struct file *filep)
|
||||||
dev->work = 0;
|
dev->work = 0;
|
||||||
init_waitqueue_head(&dev->wait);
|
init_waitqueue_head(&dev->wait);
|
||||||
filep->private_data = dev;
|
filep->private_data = dev;
|
||||||
__module_get(THIS_MODULE);
|
|
||||||
return nonseekable_open(ino, filep);
|
return nonseekable_open(ino, filep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +93,6 @@ mISDN_close(struct inode *ino, struct file *filep)
|
||||||
kfree(timer);
|
kfree(timer);
|
||||||
}
|
}
|
||||||
kfree(dev);
|
kfree(dev);
|
||||||
module_put(THIS_MODULE);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,6 +267,7 @@ mISDN_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct file_operations mISDN_fops = {
|
static const struct file_operations mISDN_fops = {
|
||||||
|
.owner = THIS_MODULE,
|
||||||
.read = mISDN_read,
|
.read = mISDN_read,
|
||||||
.poll = mISDN_poll,
|
.poll = mISDN_poll,
|
||||||
.unlocked_ioctl = mISDN_ioctl,
|
.unlocked_ioctl = mISDN_ioctl,
|
||||||
|
|
Loading…
Add table
Reference in a new issue