> > @@ -3947,11 +3947,18 @@ schedule_resp(struct scsi_cmnd *cmnd, struct
> sdebug_dev_info *devip,
> > struct sdebug_queued_cmd *sqcp = NULL;
> > struct scsi_device *sdp = cmnd->device;
>
> This patch seems incorrect because it still dereferences
> cmnd (in the above line) before it checks it for NULL.
>
Opps, haven't sent the lastest version.
> > - if (NULL == cmnd || NULL == devip) {
> > - pr_warn("called with NULL cmnd or devip pointer\n");
> > + /* this should never happend */
>
> happen?
Thanks
>
> The scsi_debug driver was written by Eric Youngdale to test
> the original Linux SCSI subsystem (or a subsequent rewrite
> of same). Remnants of its "trust nobody" style remain and
> may have been of use to more recent tinkerers.
The check is preserved with bigger warning, there is just no single call for
this function w/ cmnd == NULL.
>
> > + if (WARN_ON(!cmnd))
> > + return SCSI_MLQUEUE_HOST_BUSY;
> > +
--
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