]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wd719x: add missing .module to wd719x_template
authorOndrej Zary <linux@rainbow-software.org>
Mon, 9 Feb 2015 12:38:21 +0000 (13:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2015 13:11:07 +0000 (14:11 +0100)
commit 2ecf8e0ae28cb22d434e628c351c6193fd75fafa upstream.

wd719x_template is missing the .module field, causing module refcount
not to work, allowing to rmmod the driver while in use (mounted filesystem),
causing an oops.

Set .module to THIS_MODULE to fix the problem.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/wd719x.c

index 7702664d7ed3257e1670ee7d97ee19cadb1dc7cc..289ad016d92504e9d4ebbc47cf8d244ab6cb68b5 100644 (file)
@@ -870,6 +870,7 @@ fail_free_params:
 }
 
 static struct scsi_host_template wd719x_template = {
+       .module                         = THIS_MODULE,
        .name                           = "Western Digital 719x",
        .queuecommand                   = wd719x_queuecommand,
        .eh_abort_handler               = wd719x_abort,