Skip to content

Commit

Permalink
target: Fix sense data for out-of-bounds IO operations
Browse files Browse the repository at this point in the history
We're supposed to return LOGICAL BLOCK ADDRESS OUT OF RANGE, not
INVALID FIELD IN CDB.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
  • Loading branch information
Roland Dreier authored and Nicholas Bellinger committed Feb 13, 2013
1 parent bbf344e commit 3363367
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/target/target_core_sbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)
*/
if (cmd->t_task_lba || sectors) {
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;
break;
Expand Down

0 comments on commit 3363367

Please sign in to comment.