Re: [PATCH 2.6.32] rfkill: fix miscdev ops

Maxim Levitsky
2009-11-23T10:44:40Z

On Mon, 2009-11-23 at 11:27 +0100, Johannes Berg wrote:
> 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>
> ---
> net/rfkill/core.c | 1 +
> 1 file changed, 1 insertion(+)
>
> --- wireless-testing.orig/net/rfkill/core.c 2009-11-23 11:11:13.000000000 +0100
> +++ wireless-testing/net/rfkill/core.c 2009-11-23 11:11:59.000000000 +0100
> @@ -1191,6 +1191,7 @@ static long rfkill_fop_ioctl(struct file
> #endif
>
> static const struct file_operations rfkill_fops = {
> + .owner = THIS_MODULE,
> .open = rfkill_fop_open,
> .read = rfkill_fop_read,
> .write = rfkill_fop_write,
>
>

Thanks for the quick patch!, works fine.

Best regards,
Maxim Levitsky