Commit 2ecf8e0a authored by Ondrej Zary's avatar Ondrej Zary Committed by James Bottomley

wd719x: add missing .module to wd719x_template

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: default avatarOndrej Zary <linux@rainbow-software.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 397ea9cb
...@@ -870,6 +870,7 @@ static int wd719x_board_found(struct Scsi_Host *sh) ...@@ -870,6 +870,7 @@ static int wd719x_board_found(struct Scsi_Host *sh)
} }
static struct scsi_host_template wd719x_template = { static struct scsi_host_template wd719x_template = {
.module = THIS_MODULE,
.name = "Western Digital 719x", .name = "Western Digital 719x",
.queuecommand = wd719x_queuecommand, .queuecommand = wd719x_queuecommand,
.eh_abort_handler = wd719x_abort, .eh_abort_handler = wd719x_abort,
......
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