]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.10.42/crypto-crypto_wq-fix-late-crypto-work-queue-initialization.patch
drop queue-4.14/mips-make-sure-dt-memory-regions-are-valid.patch
[thirdparty/kernel/stable-queue.git] / releases / 3.10.42 / crypto-crypto_wq-fix-late-crypto-work-queue-initialization.patch
CommitLineData
8dca2dae
GKH
1From 130fa5bc81b44b6cc1fbdea3abf6db0da22964e0 Mon Sep 17 00:00:00 2001
2From: Tim Chen <tim.c.chen@linux.intel.com>
3Date: Mon, 17 Mar 2014 16:52:26 -0700
4Subject: crypto: crypto_wq - Fix late crypto work queue initialization
5
6From: Tim Chen <tim.c.chen@linux.intel.com>
7
8commit 130fa5bc81b44b6cc1fbdea3abf6db0da22964e0 upstream.
9
10The crypto algorithm modules utilizing the crypto daemon could
11be used early when the system start up. Using module_init
12does not guarantee that the daemon's work queue is initialized
13when the cypto alorithm depending on crypto_wq starts. It is necessary
14to initialize the crypto work queue earlier at the subsystem
15init time to make sure that it is initialized
16when used.
17
18Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
19Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
20Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21
22---
23 crypto/crypto_wq.c | 2 +-
24 1 file changed, 1 insertion(+), 1 deletion(-)
25
26--- a/crypto/crypto_wq.c
27+++ b/crypto/crypto_wq.c
28@@ -33,7 +33,7 @@ static void __exit crypto_wq_exit(void)
29 destroy_workqueue(kcrypto_wq);
30 }
31
32-module_init(crypto_wq_init);
33+subsys_initcall(crypto_wq_init);
34 module_exit(crypto_wq_exit);
35
36 MODULE_LICENSE("GPL");