linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] target: Fix sense data for out-of-bounds IO operations
@ 2013-02-08 23:18 Roland Dreier
  2013-02-08 23:18 ` [PATCH 2/3] target: Fix error checking for UNMAP commands Roland Dreier
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Roland Dreier @ 2013-02-08 23:18 UTC (permalink / raw)
  To: Nicholas A. Bellinger; +Cc: target-devel, linux-scsi, Roland Dreier

From: Roland Dreier <roland@purestorage.com>

We're supposed to return LOGICAL BLOCK ADDRESS OUT OF RANGE, not
INVALID FIELD IN CDB.

Signed-off-by: Roland Dreier <roland@purestorage.com>
---
 drivers/target/target_core_sbc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c
index a664c66..170f1f7 100644
--- a/drivers/target/target_core_sbc.c
+++ b/drivers/target/target_core_sbc.c
@@ -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;
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-02-13 20:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-08 23:18 [PATCH 1/3] target: Fix sense data for out-of-bounds IO operations Roland Dreier
2013-02-08 23:18 ` [PATCH 2/3] target: Fix error checking for UNMAP commands Roland Dreier
2013-02-09  9:23   ` Chris Boot
2013-02-09 19:27     ` Roland Dreier
2013-02-13 20:27   ` Nicholas A. Bellinger
2013-02-08 23:18 ` [PATCH 3/3] target: Fix parameter list length checking in MODE SELECT Roland Dreier
2013-02-13 20:27   ` Nicholas A. Bellinger
2013-02-13 20:26 ` [PATCH 1/3] target: Fix sense data for out-of-bounds IO operations Nicholas A. Bellinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).