crypto: algif_hash - Fix result clobbering in recvmsg
[linux-2.6-microblaze.git] / crypto / algif_hash.c
index 05e21b4..d19b09c 100644 (file)
@@ -214,7 +214,7 @@ static int hash_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
 
        ahash_request_set_crypt(&ctx->req, NULL, ctx->result, 0);
 
-       if (!result) {
+       if (!result && !ctx->more) {
                err = af_alg_wait_for_completion(
                                crypto_ahash_init(&ctx->req),
                                &ctx->completion);