From c959e1c2a475e0ad0d24eff200de9b6dcb3710c6 Mon Sep 17 00:00:00 2001 From: Arne Redlich Date: Sun, 17 Dec 2006 12:10:24 -0600 Subject: [PATCH] [SCSI] iscsi: fix 2.6.19 data digest calculation bug 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 Signed-off-by: Mike Christie Signed-off-by: James Bottomley --- drivers/scsi/iscsi_tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index d0b139cccbbc..61e3a6124c4b 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c @@ -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, -- 2.39.5