X-Git-Url: https://bbs.cooldavid.org/git/?a=blobdiff_plain;f=crypto%2Falgboss.c;fp=crypto%2Falgboss.c;h=791d194958fa18ac0fb8006e5d565f789c1e4f92;hb=326a6346ffb5b19eb593530d9d3096d409e46f62;hp=40bd391f34d90fc0b0619809beb0f09759b307f5;hpb=23a75eee070f1370bee803a34f285cf81eb5f331;p=net-next-2.6.git diff --git a/crypto/algboss.c b/crypto/algboss.c index 40bd391f34d..791d194958f 100644 --- a/crypto/algboss.c +++ b/crypto/algboss.c @@ -206,13 +206,16 @@ err: return NOTIFY_OK; } -#ifdef CONFIG_CRYPTO_MANAGER_TESTS static int cryptomgr_test(void *data) { struct crypto_test_param *param = data; u32 type = param->type; int err = 0; +#ifdef CONFIG_CRYPTO_MANAGER_DISABLE_TESTS + goto skiptest; +#endif + if (type & CRYPTO_ALG_TESTED) goto skiptest; @@ -267,7 +270,6 @@ err_put_module: err: return NOTIFY_OK; } -#endif /* CONFIG_CRYPTO_MANAGER_TESTS */ static int cryptomgr_notify(struct notifier_block *this, unsigned long msg, void *data) @@ -275,10 +277,8 @@ static int cryptomgr_notify(struct notifier_block *this, unsigned long msg, switch (msg) { case CRYPTO_MSG_ALG_REQUEST: return cryptomgr_schedule_probe(data); -#ifdef CONFIG_CRYPTO_MANAGER_TESTS case CRYPTO_MSG_ALG_REGISTER: return cryptomgr_schedule_test(data); -#endif } return NOTIFY_DONE;