diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-26 20:08:42 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-26 20:08:42 -0800 |
commit | 8912858bcb9e314549a4abc15db6b5841a96fa2c (patch) | |
tree | 92d815952374bc8f387452ab77ab3fb47e00c8f6 /crypto/authenc.c | |
parent | 423eaf8f00d89ca79bb2c9d4d22e92c9774e2d8a (diff) | |
parent | 38cb2419f544ad413c7f7aa8c17fd7377610cdd8 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
[CRYPTO] api: Fix potential race in crypto_remove_spawn
[CRYPTO] authenc: Move initialisations up to shut up gcc
Diffstat (limited to 'crypto/authenc.c')
-rw-r--r-- | crypto/authenc.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/crypto/authenc.c b/crypto/authenc.c index 0b29a6ae673d..126a529b496d 100644 --- a/crypto/authenc.c +++ b/crypto/authenc.c @@ -84,8 +84,8 @@ static int crypto_authenc_hash(struct aead_request *req) .tfm = auth, }; u8 *hash = aead_request_ctx(req); - struct scatterlist *dst; - unsigned int cryptlen; + struct scatterlist *dst = req->dst; + unsigned int cryptlen = req->cryptlen; int err; hash = (u8 *)ALIGN((unsigned long)hash + crypto_hash_alignmask(auth), @@ -100,8 +100,6 @@ static int crypto_authenc_hash(struct aead_request *req) if (err) goto auth_unlock; - cryptlen = req->cryptlen; - dst = req->dst; err = crypto_hash_update(&desc, dst, cryptlen); if (err) goto auth_unlock; @@ -159,8 +157,8 @@ static int crypto_authenc_verify(struct aead_request *req) }; u8 *ohash = aead_request_ctx(req); u8 *ihash; - struct scatterlist *src; - unsigned int cryptlen; + struct scatterlist *src = req->src; + unsigned int cryptlen = req->cryptlen; unsigned int authsize; int err; @@ -177,8 +175,6 @@ static int crypto_authenc_verify(struct aead_request *req) if (err) goto auth_unlock; - cryptlen = req->cryptlen; - src = req->src; err = crypto_hash_update(&desc, src, cryptlen); if (err) goto auth_unlock; |