From: Roland Dreier <roland@kernel.org>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: target-devel@vger.kernel.org, linux-scsi@vger.kernel.org,
Roland Dreier <roland@purestorage.com>
Subject: [PATCH 1/3] target: Fix sense data for out-of-bounds IO operations
Date: Fri, 8 Feb 2013 15:18:38 -0800 [thread overview]
Message-ID: <1360365520-11972-1-git-send-email-roland@kernel.org> (raw)
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
next reply other threads:[~2013-02-08 23:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-08 23:18 Roland Dreier [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1360365520-11972-1-git-send-email-roland@kernel.org \
--to=roland@kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@linux-iscsi.org \
--cc=roland@purestorage.com \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).