Thread (3 messages) flat view 3 messages, 2 authors, 2012-06-22

Re: crypto: gpf on boot with linux-next

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2012-06-22 12:08:04
Also in: lkml
Subsystem: crypto api, the rest · Maintainers: Herbert Xu, "David S. Miller", Linus Torvalds

On Fri, Jun 22, 2012 at 01:15:55PM +0200, Sasha Levin wrote:
Hi all,

I'm seeing the following panic when booting the latest linux-next kernel:
Oops, stupid thinko on my part.  Can you see if the following patch
on top of linux-next fixes the issue?
diff --git a/crypto/algboss.c b/crypto/algboss.c
index 368a832..f97027e 100644
--- a/crypto/algboss.c
+++ b/crypto/algboss.c
@@ -48,7 +48,7 @@ struct cryptomgr_param {
 	char larval[CRYPTO_MAX_ALG_NAME];
 	char template[CRYPTO_MAX_ALG_NAME];
 
-	struct completion completion;
+	struct completion *completion;
 
 	u32 otype;
 	u32 omask;
@@ -87,7 +87,7 @@ static int cryptomgr_probe(void *data)
 	crypto_tmpl_put(tmpl);
 
 out:
-	complete(&param->completion);
+	complete(param->completion);
 	kfree(param);
 	module_put_and_exit(0);
 }
@@ -189,14 +189,13 @@ static int cryptomgr_schedule_probe(struct crypto_larval *larval)
 
 	memcpy(param->larval, larval->alg.cra_name, CRYPTO_MAX_ALG_NAME);
 
-	init_completion(&param->completion);
+	param->completion = &larval->completion;
 
 	thread = kthread_run(cryptomgr_probe, param, "cryptomgr_probe");
 	if (IS_ERR(thread))
 		goto err_free_param;
 
-	wait_for_completion_interruptible_timeout(&param->completion, 60 * HZ);
-	complete_all(&larval->completion);
+	wait_for_completion_interruptible(&larval->completion);
 
 	return NOTIFY_STOP;
 
Thanks!
-- 
Email: Herbert Xu [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help