diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-25 11:38:25 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-25 11:38:25 -0500 |
commit | eba0e319c12fb098d66316a8eafbaaa9174a07c3 (patch) | |
tree | b2703117db9e36bb3510654efd55361f61c54742 /crypto/api.c | |
parent | df8dc74e8a383eaf2d9b44b80a71ec6f0e52b42e (diff) | |
parent | 15e7b4452b72ae890f2fcb027b4c4fa63a1c9a7a (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: (125 commits)
[CRYPTO] twofish: Merge common glue code
[CRYPTO] hifn_795x: Fixup container_of() usage
[CRYPTO] cast6: inline bloat--
[CRYPTO] api: Set default CRYPTO_MINALIGN to unsigned long long
[CRYPTO] tcrypt: Make xcbc available as a standalone test
[CRYPTO] xcbc: Remove bogus hash/cipher test
[CRYPTO] xcbc: Fix algorithm leak when block size check fails
[CRYPTO] tcrypt: Zero axbuf in the right function
[CRYPTO] padlock: Only reset the key once for each CBC and ECB operation
[CRYPTO] api: Include sched.h for cond_resched in scatterwalk.h
[CRYPTO] salsa20-asm: Remove unnecessary dependency on CRYPTO_SALSA20
[CRYPTO] tcrypt: Add select of AEAD
[CRYPTO] salsa20: Add x86-64 assembly version
[CRYPTO] salsa20_i586: Salsa20 stream cipher algorithm (i586 version)
[CRYPTO] gcm: Introduce rfc4106
[CRYPTO] api: Show async type
[CRYPTO] chainiv: Avoid lock spinning where possible
[CRYPTO] seqiv: Add select AEAD in Kconfig
[CRYPTO] scatterwalk: Handle zero nbytes in scatterwalk_map_and_copy
[CRYPTO] null: Allow setkey on digest_null
...
Diffstat (limited to 'crypto/api.c')
-rw-r--r-- | crypto/api.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/crypto/api.c b/crypto/api.c index 1f5c72477356..a2496d1bc6d4 100644 --- a/crypto/api.c +++ b/crypto/api.c | |||
@@ -137,7 +137,7 @@ static struct crypto_alg *crypto_larval_alloc(const char *name, u32 type, | |||
137 | return alg; | 137 | return alg; |
138 | } | 138 | } |
139 | 139 | ||
140 | static void crypto_larval_kill(struct crypto_alg *alg) | 140 | void crypto_larval_kill(struct crypto_alg *alg) |
141 | { | 141 | { |
142 | struct crypto_larval *larval = (void *)alg; | 142 | struct crypto_larval *larval = (void *)alg; |
143 | 143 | ||
@@ -147,6 +147,7 @@ static void crypto_larval_kill(struct crypto_alg *alg) | |||
147 | complete_all(&larval->completion); | 147 | complete_all(&larval->completion); |
148 | crypto_alg_put(alg); | 148 | crypto_alg_put(alg); |
149 | } | 149 | } |
150 | EXPORT_SYMBOL_GPL(crypto_larval_kill); | ||
150 | 151 | ||
151 | static struct crypto_alg *crypto_larval_wait(struct crypto_alg *alg) | 152 | static struct crypto_alg *crypto_larval_wait(struct crypto_alg *alg) |
152 | { | 153 | { |
@@ -176,11 +177,9 @@ static struct crypto_alg *crypto_alg_lookup(const char *name, u32 type, | |||
176 | return alg; | 177 | return alg; |
177 | } | 178 | } |
178 | 179 | ||
179 | struct crypto_alg *crypto_alg_mod_lookup(const char *name, u32 type, u32 mask) | 180 | struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask) |
180 | { | 181 | { |
181 | struct crypto_alg *alg; | 182 | struct crypto_alg *alg; |
182 | struct crypto_alg *larval; | ||
183 | int ok; | ||
184 | 183 | ||
185 | if (!name) | 184 | if (!name) |
186 | return ERR_PTR(-ENOENT); | 185 | return ERR_PTR(-ENOENT); |
@@ -193,7 +192,17 @@ struct crypto_alg *crypto_alg_mod_lookup(const char *name, u32 type, u32 mask) | |||
193 | if (alg) | 192 | if (alg) |
194 | return crypto_is_larval(alg) ? crypto_larval_wait(alg) : alg; | 193 | return crypto_is_larval(alg) ? crypto_larval_wait(alg) : alg; |
195 | 194 | ||
196 | larval = crypto_larval_alloc(name, type, mask); | 195 | return crypto_larval_alloc(name, type, mask); |
196 | } | ||
197 | EXPORT_SYMBOL_GPL(crypto_larval_lookup); | ||
198 | |||
199 | struct crypto_alg *crypto_alg_mod_lookup(const char *name, u32 type, u32 mask) | ||
200 | { | ||
201 | struct crypto_alg *alg; | ||
202 | struct crypto_alg *larval; | ||
203 | int ok; | ||
204 | |||
205 | larval = crypto_larval_lookup(name, type, mask); | ||
197 | if (IS_ERR(larval) || !crypto_is_larval(larval)) | 206 | if (IS_ERR(larval) || !crypto_is_larval(larval)) |
198 | return larval; | 207 | return larval; |
199 | 208 | ||