Do not dump stack when data length is bigger than low level driver can handle.

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@323 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Stanislaw Gruszka
2008-04-04 11:17:49 +00:00
parent f9af070111
commit 09b77a6eeb

View File

@@ -997,11 +997,11 @@ isp_xmit_response(struct scst_cmd *scst_cmd)
if (scst_cmd_get_data_direction(scst_cmd) == SCST_DATA_READ) {
unsigned int len = scst_cmd_get_resp_data_len(scst_cmd);
if (len > tmd->cd_totlen) {
/* this shouldn't happen */
/* some broken initiators may send SCSI commands with data load
* larger than underlaying transport specified */
const uint8_t ifailure[TMD_SENSELEN] = { 0xf0, 0, 0x4, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0x44 };
Eprintk("data size too big (totlen %u len %u)\n", tmd->cd_totlen, len);
dump_stack();
memcpy(tmd->cd_sense, ifailure, TMD_SENSELEN);
xact->td_hflags |= TDFH_STSVALID;