瀏覽代碼

crypto: chainiv - Use kcrypto_wq instead of keventd_wq

keventd_wq has potential starvation problem, so use dedicated
kcrypto_wq instead.

Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Huang Ying 16 年之前
父節點
當前提交
0a2e821d62
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 1 0
      crypto/Kconfig
  2. 2 1
      crypto/chainiv.c

+ 1 - 0
crypto/Kconfig

@@ -56,6 +56,7 @@ config CRYPTO_BLKCIPHER2
 	tristate
 	tristate
 	select CRYPTO_ALGAPI2
 	select CRYPTO_ALGAPI2
 	select CRYPTO_RNG2
 	select CRYPTO_RNG2
+	select CRYPTO_WORKQUEUE
 
 
 config CRYPTO_HASH
 config CRYPTO_HASH
 	tristate
 	tristate

+ 2 - 1
crypto/chainiv.c

@@ -15,6 +15,7 @@
 
 
 #include <crypto/internal/skcipher.h>
 #include <crypto/internal/skcipher.h>
 #include <crypto/rng.h>
 #include <crypto/rng.h>
+#include <crypto/crypto_wq.h>
 #include <linux/err.h>
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/kernel.h>
@@ -133,7 +134,7 @@ static int async_chainiv_schedule_work(struct async_chainiv_ctx *ctx)
 			goto out;
 			goto out;
 	}
 	}
 
 
-	queued = schedule_work(&ctx->postponed);
+	queued = queue_work(kcrypto_wq, &ctx->postponed);
 	BUG_ON(!queued);
 	BUG_ON(!queued);
 
 
 out:
 out: