]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: target/iscsi: Make sure PDU processing continues if parsing a command fails
authorBart Van Assche <bvanassche@acm.org>
Tue, 2 Apr 2019 19:58:15 +0000 (12:58 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 13 Apr 2019 00:20:06 +0000 (20:20 -0400)
commite6c3e95a2ac134e23b2ec8148fe6fd2aa13fe398
tree744c05b16d394c9b0c8cef665fe7411dbbcb4a3b
parente47b91606b6a11f0e863b1f642475c93373e1628
scsi: target/iscsi: Make sure PDU processing continues if parsing a command fails

Currently the iSCSI target driver sends a CHECK CONDITION code back to the
initiator if the immediate data buffer is too large but it does not discard
that immediate data buffer. The result is that the iSCSI target driver
attempts to parse the immediate data itself as iSCSI PDUs and that all
further iSCSI communication fails. Fix this by receiving and discarding too
large immediate data buffers.

Cc: Mike Christie <mchristi@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/iscsi/iscsi_target.c