crypto: mv_cesa - fix final callback not ignoring input data
authorPhil Sutter <phil.sutter@viprinet.com>
Mon, 27 Feb 2012 11:17:04 +0000 (12:17 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 28 Feb 2012 08:29:23 +0000 (16:29 +0800)
Broken by commit 6ef84509f3d439ed2d43ea40080643efec37f54f for users
passing a request with non-zero 'nbytes' field, like e.g. testmgr.

Cc: <stable@kernel.org> # 3.0+
Signed-off-by: Phil Sutter <phil.sutter@viprinet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/mv_cesa.c

index 015c0fcea0bd00b10c29b33c20eb5ce07e03aa70..a617c5cb379722d5d2b88bf4d2142e86688f4f1d 100644 (file)
@@ -712,6 +712,7 @@ static int mv_hash_final(struct ahash_request *req)
 {
        struct mv_req_hash_ctx *ctx = ahash_request_ctx(req);
 
+       ahash_request_set_crypt(req, NULL, req->result, 0);
        mv_update_hash_req_ctx(ctx, 1, 0);
        return mv_handle_req(&req->base);
 }