Hi Mike,

the kernel code path of iscsi_complete_pdu--> __iscsi_complete_pdu --> iscsi_scsi_cmd_rsp uses a "datalen" value which should account for the length of the data received from the target.

In iser/iscsi_iser_recv() we don't skip the AHS in case the target sent it and I'd like to fix it. I wasn't fully surewhat is done today in iscsi_tcp... I see few hits in libiscsi_tcp.c for ahslen but didn't manageto spot the a place where the ahs is being skipped, is it?

Another related issue is with this code in iscsi_scsi_cmd_rsp():

invalid_datalen:
                        iscsi_conn_printk(KERN_ERR,  conn,
"Got CHECK_CONDITION but invalid data "
                                         "buffer size of %d\n", datalen);
                        sc->result = DID_BAD_TARGET << 16;
                        goto out;
                }

                senselen = get_unaligned_be16(data);
                if (datalen < senselen)
                        goto invalid_datalen;


Partial sense can come into play e.g with target (e.g non-Linux one) sending sense which is bigger than SCSI_SENSE_BUFFERSIZE or b/c the initiator RDSL doesn't let them
send the whole sense, etc.

This code isn't willing to provide the SCSI midlayer with partial sense, why not do
allow that?

Or.

--
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to