Re: [PATCH 09/11] IB/srp: Fix a NULL pointer dereference

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

 



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


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux