Skip to content

Commit

Permalink
rfkill: fix miscdev ops
Browse files Browse the repository at this point in the history
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: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Nov 23, 2009
1 parent 54ab040 commit 45ba564
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/rfkill/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 45ba564

Please sign in to comment.