All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cristian Stoica <cristian.stoica@freescale.com>
To: <herbert@gondor.apana.org.au>, <linux-crypto@vger.kernel.org>
Cc: <davem@davemloft.net>, Cristian Stoica <cristian.stoica@freescale.com>
Subject: [PATCH] crypto: tcrypt speed: fix filter for aead algorithms
Date: Tue, 3 Feb 2015 15:59:48 +0200	[thread overview]
Message-ID: <1422971988-21517-1-git-send-email-cristian.stoica@freescale.com> (raw)

test_aead_speed is written for sync algorithms without specifically
requiring them. The effect is that an async algorithm may be used without
setting up the request callback, this leading to a kernel panic.

Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
---
 crypto/tcrypt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index 4b9e23f..5dc5a25 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -314,7 +314,8 @@ static void test_aead_speed(const char *algo, int enc, unsigned int secs,
 	asg = &sg[8];
 	sgout = &asg[8];
 
-	tfm = crypto_alloc_aead(algo, 0, 0);
+	/* This test is not for ASYNC algorithms */
+	tfm = crypto_alloc_aead(algo, 0, CRYPTO_ALG_ASYNC);
 
 	if (IS_ERR(tfm)) {
 		pr_err("alg: aead: Failed to load transform for %s: %ld\n", algo,
-- 
2.0.5

             reply	other threads:[~2015-02-03 14:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-03 13:59 Cristian Stoica [this message]
2015-02-27  9:25 ` [PATCH] crypto: tcrypt speed: fix filter for aead algorithms Herbert Xu
2015-02-27 11:14   ` Cristian Stoica
2015-02-28  9:13     ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1422971988-21517-1-git-send-email-cristian.stoica@freescale.com \
    --to=cristian.stoica@freescale.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.