Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>

authored by

Roland Dreier and committed by
Nicholas Bellinger
33633676 bbf344e5

+1 -1
+1 -1
drivers/target/target_core_sbc.c
··· 486 486 */ 487 487 if (cmd->t_task_lba || sectors) { 488 488 if (sbc_check_valid_sectors(cmd) < 0) 489 - return TCM_INVALID_CDB_FIELD; 489 + return TCM_ADDRESS_OUT_OF_RANGE; 490 490 } 491 491 cmd->execute_cmd = ops->execute_sync_cache; 492 492 break;