]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
crypto: tcrypt - Handle async return from crypto_ahash_init
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 22 Apr 2015 03:02:27 +0000 (11:02 +0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 26 Feb 2017 05:34:28 +0000 (21:34 -0800)
Orabug: 25243093

The function crypto_ahash_init can also be asynchronous just
like update and final.  So all callers must be able to handle
an async return.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 43a9607d86e8fb110b596d300dbaae895c198fed)
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
crypto/tcrypt.c

index df27b99b171bfd387989edd9165b7110bdb6a17d..4a32ad028ba6364bf604f4a9b9b80b01f8bf1324 100644 (file)
@@ -828,7 +828,7 @@ static int test_ahash_jiffies(struct ahash_request *req, int blen,
 
        for (start = jiffies, end = start + secs * HZ, bcount = 0;
             time_before(jiffies, end); bcount++) {
-               ret = crypto_ahash_init(req);
+               ret = do_one_ahash_op(req, crypto_ahash_init(req));
                if (ret)
                        return ret;
                for (pcount = 0; pcount < blen; pcount += plen) {
@@ -897,7 +897,7 @@ static int test_ahash_cycles(struct ahash_request *req, int blen,
 
        /* Warm-up run. */
        for (i = 0; i < 4; i++) {
-               ret = crypto_ahash_init(req);
+               ret = do_one_ahash_op(req, crypto_ahash_init(req));
                if (ret)
                        goto out;
                for (pcount = 0; pcount < blen; pcount += plen) {
@@ -916,7 +916,7 @@ static int test_ahash_cycles(struct ahash_request *req, int blen,
 
                start = get_cycles();
 
-               ret = crypto_ahash_init(req);
+               ret = do_one_ahash_op(req, crypto_ahash_init(req));
                if (ret)
                        goto out;
                for (pcount = 0; pcount < blen; pcount += plen) {