Commit 45ba564d authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

rfkill: fix miscdev ops

The /dev/rfkill ops don't refer to the module,
so it is possible to unload the module while
file descriptors are open. Fix this oversight.
Reported-by: default avatarMaxim Levitsky <maximlevitsky@gmail.com>
Cc: stable@kernel.org
Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 54ab040d
...@@ -1188,6 +1188,7 @@ static long rfkill_fop_ioctl(struct file *file, unsigned int cmd, ...@@ -1188,6 +1188,7 @@ static long rfkill_fop_ioctl(struct file *file, unsigned int cmd,
#endif #endif
static const struct file_operations rfkill_fops = { static const struct file_operations rfkill_fops = {
.owner = THIS_MODULE,
.open = rfkill_fop_open, .open = rfkill_fop_open,
.read = rfkill_fop_read, .read = rfkill_fop_read,
.write = rfkill_fop_write, .write = rfkill_fop_write,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment