On Wed, Apr 27, 2016 at 12:04:52AM +0300, Sagi Grimberg wrote: > >Avoid that running xfstests on top of the SRP initiator triggers > >the call trace below. This patch has been tested by running the > >following shell command on an initiator system that has access > >to 3200 SRP LUNs: > > That's good to know, but the patch description needs to state where > the NULL deref originates i.e. when can req be NULL and why it is > OK to just assign to NULL and continue... > > > scmnd = scsi_host_find_tag(target->scsi_host, rsp->tag); > > if (scmnd) { > > req = (void *)scmnd->host_scribble; > >- scmnd = srp_claim_req(ch, req, NULL, scmnd); > >+ scmnd = req ? srp_claim_req(ch, req, NULL, scmnd) : > >+ NULL; > > } > > if (!scmnd) { > > shost_printk(KERN_ERR, target->scsi_host, > > And if it is OK to assign NULL to scmd, will the error print above still valid? > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html
Attachment:
signature.asc
Description: Digital signature