[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.

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Mon May 20 00:50:24 CEST 2013


On Sat, 18 May 2013 08:55:58 -0700
Ronnie Sahlberg <ronniesahlberg at gmail.com> wrote:

> 
> 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);

Applied, thanks.
--
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