Fix initialization order bug

This commit is contained in:
Kent Overstreet 2017-02-02 12:57:48 -09:00
parent b33fc8298f
commit 379520ee87
2 changed files with 2 additions and 9 deletions

View File

@ -9,7 +9,7 @@
struct module;
#define module_init(initfn) \
__attribute__((constructor(109))) \
__attribute__((constructor(120))) \
static void __call_##initfn(void) { BUG_ON(initfn()); }
#if 0

View File

@ -78,15 +78,8 @@ static struct shash_alg alg = {
}
};
__attribute__((constructor(110)))
static int __init sha1_generic_mod_init(void)
{
return crypto_register_shash(&alg);
}
static void __exit sha1_generic_mod_fini(void)
{
crypto_unregister_shash(&alg);
}
module_init(sha1_generic_mod_init);
module_exit(sha1_generic_mod_fini);