提交 33633676 编写于 作者: R Roland Dreier 提交者: Nicholas Bellinger

target: Fix sense data for out-of-bounds IO operations

We're supposed to return LOGICAL BLOCK ADDRESS OUT OF RANGE, not
INVALID FIELD IN CDB.
Signed-off-by: NRoland Dreier <roland@purestorage.com>
Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
上级 bbf344e5
...@@ -486,7 +486,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops) ...@@ -486,7 +486,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)
*/ */
if (cmd->t_task_lba || sectors) { if (cmd->t_task_lba || sectors) {
if (sbc_check_valid_sectors(cmd) < 0) if (sbc_check_valid_sectors(cmd) < 0)
return TCM_INVALID_CDB_FIELD; return TCM_ADDRESS_OUT_OF_RANGE;
} }
cmd->execute_cmd = ops->execute_sync_cache; cmd->execute_cmd = ops->execute_sync_cache;
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册