Re: [PATCH] mpt3sas: delay scsi_add_host call to work with scsi-mq

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

 



On Fri, Jun 06, 2014 at 01:03:41AM +0000, Elliott, Robert (Server Storage) wrote:
> In _scsih_probe, delay the call to scsi_add_host until
> the host template has been completely filled in.

Beside scsi-mq not picking up the queue depth callng scsi_add_host
on a not fully setup host also is dangerous because scsi_add_host sets
the host life and it can now see userspace LUN scans or removals, so the
fix is needed either.

The late scsi_remove_host also fixed by your patch is just as dangerous.

Given the copy and paste nature of the two driver I suspect mpt2sas will
need the same fix.

> +	if ((scsi_add_host(shost, &pdev->dev))) {
> +		pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n",
> +		    ioc->name, __FILE__, __LINE__, __func__);
> +		goto out_add_shost_fail;
> +	}
> +
>  	scsi_scan_host(shost);

No need to fix this now, but discarding the error return from
scsi_add_host is a bad idea, the function should eventually switch to
having an int error variable for it.

Looks good,

Reviewed-by: Christoph Hellwig <hch@xxxxxx>
--
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