Skip to content

Commit

Permalink
[CRYPTO] cryptd: Fix EINPROGRESS notification context
Browse files Browse the repository at this point in the history
The EINPROGRESS notifications should be done just like the final
call-backs, i.e., with BH off.  This patch fixes the call in cryptd
since previously it was called with BH on.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
herbertx committed Jul 10, 2008
1 parent 872ac87 commit 93aa7f8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions crypto/cryptd.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,8 @@ static void cryptd_blkcipher_crypt(struct ablkcipher_request *req,

rctx = ablkcipher_request_ctx(req);

if (unlikely(err == -EINPROGRESS)) {
rctx->complete(&req->base, err);
return;
}
if (unlikely(err == -EINPROGRESS))
goto out;

desc.tfm = child;
desc.info = req->info;
Expand All @@ -95,8 +93,9 @@ static void cryptd_blkcipher_crypt(struct ablkcipher_request *req,

req->base.complete = rctx->complete;

out:
local_bh_disable();
req->base.complete(&req->base, err);
rctx->complete(&req->base, err);
local_bh_enable();
}

Expand Down

0 comments on commit 93aa7f8

Please sign in to comment.