From c6c6a94965e7cc85b0e099de0caa3aab55608c77 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 17 Nov 2019 19:19:09 +0000 Subject: [PATCH] iscsi: Remove a debug assert Remove this debug assert because it a write residual can happen, e.g. if the expected transfer length exceeds the Data Out buffer length. This statement was hit by the following CDB, submitted by the libiscsi regression tests: [14896]: scst: scst_parse_cmd:1235:Warning: expected transfer length 0 (DIF 0) for opcode WRITE(10) (handler vdisk_fileio, target iscsi) doesn't match decoded value 512 [14896]: scst_parse_cmd:1243:Suspicious CDB: (h)___0__1__2__3__4__5__6__7__8__9__A__B__C__D__E__F 0: 2a 00 00 00 00 00 00 00 01 00 *......... git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8659 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/iscsi.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/iscsi-scst/kernel/iscsi.c b/iscsi-scst/kernel/iscsi.c index 200ffc9c2..5c27259d3 100644 --- a/iscsi-scst/kernel/iscsi.c +++ b/iscsi-scst/kernel/iscsi.c @@ -985,9 +985,6 @@ static void send_data_rsp(struct iscsi_cmnd *req, u8 status, int send_status) if (send_status) { TRACE_DBG("status %x", status); - EXTRACHECKS_BUG_ON((cmnd_hdr(req)->flags & - ISCSI_CMD_WRITE) != 0); - rsp_hdr->flags = ISCSI_FLG_FINAL | ISCSI_FLG_STATUS; rsp_hdr->cmd_status = status;