summaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@wdc.com>2017-10-31 11:03:15 -0700
committerNicholas Bellinger <nab@linux-iscsi.org>2017-11-04 15:15:56 -0700
commitde3493aea656ad7ae2e8dd492ee928712d147c74 (patch)
tree634bcd82455b4e4f12c4e21e128ab922c617a7b5 /drivers/target
parent919765e9680fe26acdcad782ee693f31dbde2def (diff)
downloadlinux-stable-de3493aea656ad7ae2e8dd492ee928712d147c74.tar.gz
linux-stable-de3493aea656ad7ae2e8dd492ee928712d147c74.tar.bz2
linux-stable-de3493aea656ad7ae2e8dd492ee928712d147c74.zip
target/iscsi: Fix endianness in an error message
Since hdr->offset is a big endian number, convert it to CPU endian before printing it. Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Mike Christie <mchristi@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/iscsi/iscsi_target.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index 5001261f5d69..37bc8a37401d 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -1460,9 +1460,9 @@ __iscsit_check_dataout_hdr(struct iscsi_conn *conn, void *buf,
iscsit_mod_dataout_timer(cmd);
if ((be32_to_cpu(hdr->offset) + payload_length) > cmd->se_cmd.data_length) {
- pr_err("DataOut Offset: %u, Length %u greater than"
- " iSCSI Command EDTL %u, protocol error.\n",
- hdr->offset, payload_length, cmd->se_cmd.data_length);
+ pr_err("DataOut Offset: %u, Length %u greater than iSCSI Command EDTL %u, protocol error.\n",
+ be32_to_cpu(hdr->offset), payload_length,
+ cmd->se_cmd.data_length);
return iscsit_reject_cmd(cmd, ISCSI_REASON_BOOKMARK_INVALID, buf);
}