Skip to content

Commit

Permalink
wd719x: add missing .module to wd719x_template
Browse files Browse the repository at this point in the history
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>
Cc: <stable@vger.kernel.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Ondrej Zary authored and James Bottomley committed Feb 15, 2015
1 parent 397ea9c commit 2ecf8e0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/scsi/wd719x.c
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,7 @@ static int wd719x_board_found(struct Scsi_Host *sh)
}

static struct scsi_host_template wd719x_template = {
.module = THIS_MODULE,
.name = "Western Digital 719x",
.queuecommand = wd719x_queuecommand,
.eh_abort_handler = wd719x_abort,
Expand Down

0 comments on commit 2ecf8e0

Please sign in to comment.