diff options
author | Huang Ying <ying.huang@intel.com> | 2009-11-16 21:52:22 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2009-11-16 21:52:22 +0800 |
commit | 656585a65371ca5a133e77f11550e2082a4e9a3a (patch) | |
tree | c1b0b14776ea914b85e5b6a5a1d29b8df8466cf4 /crypto/tcrypt.c | |
parent | b2a6de237d081577c556da17412fa36899bbc03f (diff) | |
download | linux-crypto-656585a65371ca5a133e77f11550e2082a4e9a3a.tar.gz linux-crypto-656585a65371ca5a133e77f11550e2082a4e9a3a.zip |
crypto: gcm - fix another complete call in complete fuction
The flow of the complete function (xxx_done) in gcm.c is as follow:
void complete(struct crypto_async_request *areq, int err)
{
struct aead_request *req = areq->data;
if (!err) {
err = async_next_step();
if (err == -EINPROGRESS || err == -EBUSY)
return;
}
complete_for_next_step(areq, err);
}
But *areq may be destroyed in async_next_step(), this makes
complete_for_next_step() can not work properly. To fix this, one of
following methods is used for each complete function.
- Add a __complete() for each complete(), which accept struct
aead_request *req instead of areq, so avoid using areq after it is
destroyed.
- Expand complete_for_next_step().
The fixing method is based on the idea of Herbert Xu.
Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/tcrypt.c')
0 files changed, 0 insertions, 0 deletions