瀏覽代碼

crypto: tcrypt - Do not bail on EINPROGRESS in multibuffer hash test

The multibuffer hash speed test is incorrectly bailing because
of an EINPROGRESS return value.  This patch fixes it by setting
ret to zero if it is equal to -EINPROGRESS.

Reported-by: Megha Dey <megha.dey@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Herbert Xu 9 年之前
父節點
當前提交
d13cd11fbc
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      crypto/tcrypt.c

+ 3 - 1
crypto/tcrypt.c

@@ -486,8 +486,10 @@ static void test_mb_ahash_speed(const char *algo, unsigned int sec,
 
 
 		for (k = 0; k < 8; k++) {
 		for (k = 0; k < 8; k++) {
 			ret = crypto_ahash_digest(data[k].req);
 			ret = crypto_ahash_digest(data[k].req);
-			if (ret == -EINPROGRESS)
+			if (ret == -EINPROGRESS) {
+				ret = 0;
 				continue;
 				continue;
+			}
 
 
 			if (ret)
 			if (ret)
 				break;
 				break;