[stgt] [PATCH] Fix REPORT SUPPORTED OPCODES The length of the data buffer is written to the first 4 bytes in the buffer not to the end of the bugger.

Ronnie Sahlberg ronniesahlberg at gmail.com
Sat May 18 17:55:58 CEST 2013

Signed-off-by: Ronnie Sahlberg <ronniesahlberg at gmail.com>
 usr/spc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/usr/spc.c b/usr/spc.c
index aeb022a..641366f 100644
--- a/usr/spc.c
+++ b/usr/spc.c
@@ -777,7 +777,7 @@ static int report_opcodes_all(struct scsi_cmd *cmd, int rctd,
 	avail_len = data - &buf[0];
-	put_unaligned_be32(avail_len-4, data);
+	put_unaligned_be32(avail_len-4, &buf[0]);
 	actual_len = spc_memcpy(scsi_get_in_buffer(cmd), &alloc_len,
 				buf, avail_len);

To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

More information about the stgt mailing list