diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-28 18:05:50 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-28 18:05:50 -0400 |
commit | b0d44c0dbbd52effb731b1c0af9afd56215c48de (patch) | |
tree | 3237c0087d91a5390aed05689b9f610ba16fa116 /crypto/api.c | |
parent | 9537a48ed4b9e4b738943d6da0a0fd4278adf905 (diff) | |
parent | 7c730ccdc1188b97f5c8cb690906242c7ed75c22 (diff) |
Merge branch 'linus' into core/iommu
Conflicts:
arch/x86/Kconfig
Diffstat (limited to 'crypto/api.c')
-rw-r--r-- | crypto/api.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/crypto/api.c b/crypto/api.c index 38a2bc02a98c..314dab96840e 100644 --- a/crypto/api.c +++ b/crypto/api.c | |||
@@ -255,7 +255,7 @@ struct crypto_alg *crypto_alg_mod_lookup(const char *name, u32 type, u32 mask) | |||
255 | struct crypto_alg *larval; | 255 | struct crypto_alg *larval; |
256 | int ok; | 256 | int ok; |
257 | 257 | ||
258 | if (!(mask & CRYPTO_ALG_TESTED)) { | 258 | if (!((type | mask) & CRYPTO_ALG_TESTED)) { |
259 | type |= CRYPTO_ALG_TESTED; | 259 | type |= CRYPTO_ALG_TESTED; |
260 | mask |= CRYPTO_ALG_TESTED; | 260 | mask |= CRYPTO_ALG_TESTED; |
261 | } | 261 | } |
@@ -464,8 +464,8 @@ err: | |||
464 | } | 464 | } |
465 | EXPORT_SYMBOL_GPL(crypto_alloc_base); | 465 | EXPORT_SYMBOL_GPL(crypto_alloc_base); |
466 | 466 | ||
467 | struct crypto_tfm *crypto_create_tfm(struct crypto_alg *alg, | 467 | void *crypto_create_tfm(struct crypto_alg *alg, |
468 | const struct crypto_type *frontend) | 468 | const struct crypto_type *frontend) |
469 | { | 469 | { |
470 | char *mem; | 470 | char *mem; |
471 | struct crypto_tfm *tfm = NULL; | 471 | struct crypto_tfm *tfm = NULL; |
@@ -499,9 +499,9 @@ out_free_tfm: | |||
499 | crypto_shoot_alg(alg); | 499 | crypto_shoot_alg(alg); |
500 | kfree(mem); | 500 | kfree(mem); |
501 | out_err: | 501 | out_err: |
502 | tfm = ERR_PTR(err); | 502 | mem = ERR_PTR(err); |
503 | out: | 503 | out: |
504 | return tfm; | 504 | return mem; |
505 | } | 505 | } |
506 | EXPORT_SYMBOL_GPL(crypto_create_tfm); | 506 | EXPORT_SYMBOL_GPL(crypto_create_tfm); |
507 | 507 | ||
@@ -525,12 +525,11 @@ EXPORT_SYMBOL_GPL(crypto_create_tfm); | |||
525 | * | 525 | * |
526 | * In case of error the return value is an error pointer. | 526 | * In case of error the return value is an error pointer. |
527 | */ | 527 | */ |
528 | struct crypto_tfm *crypto_alloc_tfm(const char *alg_name, | 528 | void *crypto_alloc_tfm(const char *alg_name, |
529 | const struct crypto_type *frontend, | 529 | const struct crypto_type *frontend, u32 type, u32 mask) |
530 | u32 type, u32 mask) | ||
531 | { | 530 | { |
532 | struct crypto_alg *(*lookup)(const char *name, u32 type, u32 mask); | 531 | struct crypto_alg *(*lookup)(const char *name, u32 type, u32 mask); |
533 | struct crypto_tfm *tfm; | 532 | void *tfm; |
534 | int err; | 533 | int err; |
535 | 534 | ||
536 | type &= frontend->maskclear; | 535 | type &= frontend->maskclear; |