Re: [PATCH] fill in scsi_host_template module owner

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Olaf Kirch wrote:
> I recently ran into an oops that happens because you
> can shut down all of iSCSI even though you still have
> iSCSI targets mounted. It turned out that iscsi's
> scsi_host_template missed a THIS_MODULE, so
> reference counting wasn't done properly. Brief
> inspection showed that this seems to be a rather
> wide-spread problem. Here's a patch to address this.
> 

I did not see this in scsi-misc so I am not sure if it matters or you
need a ack or signed off for iscsi, but the iscsi and iser parts look ok

Signed-off-by: Mike Christie <michaelc@xxxxxxxxxxx>

> Index: linux-2.6/drivers/scsi/iscsi_tcp.c
> ===================================================================
> --- linux-2.6.orig/drivers/scsi/iscsi_tcp.c
> +++ linux-2.6/drivers/scsi/iscsi_tcp.c
> @@ -2133,6 +2133,7 @@ static void iscsi_tcp_session_destroy(st
>  }
>  
>  static struct scsi_host_template iscsi_sht = {
> +	.module			= THIS_MODULE,
>  	.name			= "iSCSI Initiator over TCP/IP",
>  	.queuecommand           = iscsi_queuecommand,
>  	.change_queue_depth	= iscsi_change_queue_depth,


> Index: linux-2.6/drivers/infiniband/ulp/iser/iscsi_iser.c
> ===================================================================
> --- linux-2.6.orig/drivers/infiniband/ulp/iser/iscsi_iser.c
> +++ linux-2.6/drivers/infiniband/ulp/iser/iscsi_iser.c
> @@ -543,6 +543,7 @@ iscsi_iser_ep_disconnect(__u64 ep_handle
>  }
>  
>  static struct scsi_host_template iscsi_iser_sht = {
> +	.module                 = THIS_MODULE,
>  	.name                   = "iSCSI Initiator over iSER, v." DRV_VER,
>  	.queuecommand           = iscsi_queuecommand,
>  	.can_queue		= ISCSI_XMIT_CMDS_MAX - 1,
> 

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux