mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Chuck Ebbert <cebbert@redhat.com>
Cc: linux-kernel@vger.kernel.org,
	Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
Subject: Re: VIA Padlock driver no longer loads automatically
Date: Tue, 21 Apr 2009 13:53:31 +0800	[thread overview]
Message-ID: <20090421055331.GA14062@gondor.apana.org.au> (raw)
In-Reply-To: <20090420181402.2b0424f4@dhcp-100-2-144.bos.redhat.com>

On Mon, Apr 20, 2009 at 06:14:02PM -0400, Chuck Ebbert wrote:
> On x86 machines only aes_generic and aes_i586 get loaded automatically as of
> kernel 2.6.29. Looks like this was caused by:
> 
>   commit a760a6656e6f00bb0144a42a048cf0266646e22c
>   crypto: api - Fix module load deadlock with fallback algorithms

Thanks for the report.  This patch should fix the problem.

commit 37fc334cc8eb84f5fe0a5a1cbe6a6a68049e142a
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date:   Tue Apr 21 13:27:16 2009 +0800

    crypto: api - Fix algorithm module auto-loading
    
    The commit a760a6656e6f00bb0144a42a048cf0266646e22c (crypto:
    api - Fix module load deadlock with fallback algorithms) broke
    the auto-loading of algorithms that require fallbacks.  The
    problem is that the fallback mask check is missing an and which
    cauess bits that should be considered to interfere with the
    result.
    
    Reported-by: Chuck Ebbert <cebbert@redhat.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

diff --git a/crypto/api.c b/crypto/api.c
index 314dab9..fd2545d 100644
--- a/crypto/api.c
+++ b/crypto/api.c
@@ -221,7 +221,8 @@ struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask)
 
 		request_module(name);
 
-		if (!((type ^ CRYPTO_ALG_NEED_FALLBACK) & mask) &&
+		if (!((type ^ CRYPTO_ALG_NEED_FALLBACK) & mask &
+		      CRYPTO_ALG_NEED_FALLBACK) &&
 		    snprintf(tmp, sizeof(tmp), "%s-all", name) < sizeof(tmp))
 			request_module(tmp);
 
Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  reply	other threads:[~2009-04-21  5:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-20 22:14 Chuck Ebbert
2009-04-21  5:53 ` Herbert Xu [this message]
2009-04-21  5:56   ` Herbert Xu
2009-04-21  8:26     ` Sebastian Andrzej Siewior
2009-04-21 10:53       ` Herbert Xu
2009-04-21 11:51         ` Sebastian Andrzej Siewior

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=20090421055331.GA14062@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=cebbert@redhat.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®