From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752730AbaCQXw6 (ORCPT ); Mon, 17 Mar 2014 19:52:58 -0400 Received: from mga02.intel.com ([134.134.136.20]:21623 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752577AbaCQXwx (ORCPT ); Mon, 17 Mar 2014 19:52:53 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,673,1389772800"; d="scan'208";a="501920387" Subject: [PATCH] Fix late crypto work queue initialization From: Tim Chen To: Herbert Xu , "H. Peter Anvin" , "David S.Miller" Cc: Tim Chen , linux-crypto@vger.kernel.org, linux-kernel , "Huang, Ying" Content-Type: text/plain; charset="UTF-8" Date: Mon, 17 Mar 2014 16:52:26 -0700 Message-ID: <1395100347.2970.14.camel@schen9-DESK> Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 (2.32.3-1.fc14) Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The crypto algorithm modules utilizing the crypto daemon could be used early when the system start up. Using module_init does not guarantee that the daemon's work queue is initialized when the cypto alorithm depending on crypto_wq starts. It is necessary to initialize the crypto work queue earlier at the subsystem init time to make sure that it is initialized when used. Signed-off-by: Tim Chen --- crypto/crypto_wq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/crypto_wq.c b/crypto/crypto_wq.c index adad92a..2f1b8d1 100644 --- a/crypto/crypto_wq.c +++ b/crypto/crypto_wq.c @@ -33,7 +33,7 @@ static void __exit crypto_wq_exit(void) destroy_workqueue(kcrypto_wq); } -module_init(crypto_wq_init); +subsys_initcall(crypto_wq_init); module_exit(crypto_wq_exit); MODULE_LICENSE("GPL"); -- 1.7.11.7