Skip to content

Commit

Permalink
[SCSI] iscsi: fix 2.6.19 data digest calculation bug
Browse files Browse the repository at this point in the history
The transition from crypto_digest_*() to  the crypto_hash_*() family
introduced a bug into the data digest calculation: crypto_hash_update() is
called with the number of S/G elements instead of the S/G lists data size.

Signed-off-by: Arne Redlich <arne.redlich@xiranet.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Arne Redlich authored and James Bottomley committed Jan 6, 2007
1 parent ddaf6fc commit c959e1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/iscsi_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ static int iscsi_scsi_data_in(struct iscsi_conn *conn)
if (!offset)
crypto_hash_update(
&tcp_conn->rx_hash,
&sg[i], 1);
&sg[i], sg[i].length);
else
partial_sg_digest_update(
&tcp_conn->rx_hash,
Expand Down

0 comments on commit c959e1c

Please sign in to comment.