Skip to content

Commit

Permalink
crypto: cryptd - Use subsys_initcall to prevent races with aesni
Browse files Browse the repository at this point in the history
As cryptd is depeneded on by other algorithms such as aesni-intel,
it needs to be registered before them.  When everything is built
as modules, this occurs naturally.  However, for this to work when
they are built-in, we need to use subsys_initcall in cryptd.

Tested-by: Josh Boyer <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
herbertx committed Aug 20, 2011
1 parent 4619b6b commit b2bac6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/cryptd.c
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ static void __exit cryptd_exit(void)
crypto_unregister_template(&cryptd_tmpl);
}

module_init(cryptd_init);
subsys_initcall(cryptd_init);
module_exit(cryptd_exit);

MODULE_LICENSE("GPL");
Expand Down

0 comments on commit b2bac6a

Please sign in to comment.