* [PATCH] Fix late crypto work queue initialization
@ 2014-03-17 23:52 Tim Chen
2014-03-21 0:18 ` Tim Chen
2014-03-21 14:40 ` Herbert Xu
0 siblings, 2 replies; 5+ messages in thread
From: Tim Chen @ 2014-03-17 23:52 UTC (permalink / raw)
To: Herbert Xu, H. Peter Anvin, David S.Miller
Cc: Tim Chen, linux-crypto, linux-kernel, Huang, Ying
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 <tim.c.chen@linux.intel.com>
---
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix late crypto work queue initialization
2014-03-17 23:52 [PATCH] Fix late crypto work queue initialization Tim Chen
@ 2014-03-21 0:18 ` Tim Chen
2014-03-21 14:40 ` Herbert Xu
1 sibling, 0 replies; 5+ messages in thread
From: Tim Chen @ 2014-03-21 0:18 UTC (permalink / raw)
To: Herbert Xu
Cc: H. Peter Anvin, David S.Miller, linux-crypto, linux-kernel,
Huang, Ying
On Mon, 2014-03-17 at 16:52 -0700, Tim Chen wrote:
> 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 <tim.c.chen@linux.intel.com>
> ---
> 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");
Herbert,
Any feedback on this patch?
Thanks.
Tim
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix late crypto work queue initialization
2014-03-17 23:52 [PATCH] Fix late crypto work queue initialization Tim Chen
2014-03-21 0:18 ` Tim Chen
@ 2014-03-21 14:40 ` Herbert Xu
2014-03-25 23:40 ` Tim Chen
1 sibling, 1 reply; 5+ messages in thread
From: Herbert Xu @ 2014-03-21 14:40 UTC (permalink / raw)
To: Tim Chen
Cc: H. Peter Anvin, David S.Miller, linux-crypto, linux-kernel,
Huang, Ying
On Mon, Mar 17, 2014 at 04:52:26PM -0700, Tim Chen wrote:
> 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 <tim.c.chen@linux.intel.com>
Patch applied.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix late crypto work queue initialization
2014-03-21 14:40 ` Herbert Xu
@ 2014-03-25 23:40 ` Tim Chen
2014-03-26 0:14 ` Greg Kroah-Hartman
0 siblings, 1 reply; 5+ messages in thread
From: Tim Chen @ 2014-03-25 23:40 UTC (permalink / raw)
To: Herbert Xu, Greg Kroah-Hartman
Cc: H. Peter Anvin, David S.Miller, linux-crypto, linux-kernel,
Huang, Ying, stable
On Fri, 2014-03-21 at 22:40 +0800, Herbert Xu wrote:
> On Mon, Mar 17, 2014 at 04:52:26PM -0700, Tim Chen wrote:
> > 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 <tim.c.chen@linux.intel.com>
>
> Patch applied.
Herbert,
Probably this patch should go to the stable patches as well.
Copying Greg.
Thanks.
Tim
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix late crypto work queue initialization
2014-03-25 23:40 ` Tim Chen
@ 2014-03-26 0:14 ` Greg Kroah-Hartman
0 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2014-03-26 0:14 UTC (permalink / raw)
To: Tim Chen
Cc: Herbert Xu, H. Peter Anvin, David S.Miller, linux-crypto,
linux-kernel, Huang, Ying, stable
On Tue, Mar 25, 2014 at 04:40:56PM -0700, Tim Chen wrote:
> On Fri, 2014-03-21 at 22:40 +0800, Herbert Xu wrote:
> > On Mon, Mar 17, 2014 at 04:52:26PM -0700, Tim Chen wrote:
> > > 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 <tim.c.chen@linux.intel.com>
> >
> > Patch applied.
>
> Herbert,
>
> Probably this patch should go to the stable patches as well.
> Copying Greg.
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read Documentation/stable_kernel_rules.txt
for how to do this properly.
</formletter>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-03-26 0:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-17 23:52 [PATCH] Fix late crypto work queue initialization Tim Chen
2014-03-21 0:18 ` Tim Chen
2014-03-21 14:40 ` Herbert Xu
2014-03-25 23:40 ` Tim Chen
2014-03-26 0:14 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).