[SCSI] iscsi: fix 2.6.19 data digest calculation bug
authorArne Redlich <agr@powerkom-dd.de>
Sun, 17 Dec 2006 18:10:24 +0000 (12:10 -0600)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Sat, 6 Jan 2007 14:59:23 +0000 (08:59 -0600)
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>
drivers/scsi/iscsi_tcp.c

index d0b139cccbbc388371f45005e6ae51d00f9e55c5..61e3a6124c4b7a52a7d72ac7ac82dc312fdab8e9 100644 (file)
@@ -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,