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 <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html