Skip to contentSkip to conversation

wd719x: add missing .module to wd719x_template

PATCH RESEND In review Ondrej Zary 2 participants 3 messages Feb 9, 2015 – Feb 12, 2015 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 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.

---
 drivers/scsi/wd719x.c |    1 +
 1 file changed, 1 insertion(+)
drivers/scsi/wd719x.c +1 -0
index 7702664..289ad01 100644
@@ -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,
Signature · 1 line
Ondrej Zary
maintainer
#1 lore raw
Quoted 5 lines · Ondrej Zary

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.

This requires a cc to stable, doesn't it?

James

#2 lore raw
Quoted 8 lines · James Bottomley
Quoted 5 lines · Ondrej Zary

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.

This requires a cc to stable, doesn't it?

Should go into 3.19-stable.

Signature · 1 line
Ondrej Zary