If an application builds an INQUIRY CDB containing a
command length longer than the expected transfer
length of the command, the iscsi subsystem resets the
transfer length to the size of the INQUIRY CDB. Then if
the target accually returns more than the initial expected
transfer length the data buffer isn't large enought to
In this case a message similar to
"iSCSI: session f5bf8000 recv_data for itt 94, task
ec1eff18, cmnd eac38600, bufflen 200, Data PDU with
offset 0 len 255 overflows command buffer, dropping
is returned by the initiator and the session gets dropped.
Removing the code to reset the transfer len to the size
of the INQUIRY CDB solves this problem.
This patch also fixes a build problem, when debug is