Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1188,6 +1188,7 @@ static long rfkill_fop_ioctl(struct file *file, unsigned int cmd,
#endif

static const struct file_operations rfkill_fops = {
	.owner		= THIS_MODULE,
	.open		= rfkill_fop_open,
	.read		= rfkill_fop_read,
	.write		= rfkill_fop_write,