Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756984AbZDICgS (ORCPT ); Wed, 8 Apr 2009 22:36:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755405AbZDICf7 (ORCPT ); Wed, 8 Apr 2009 22:35:59 -0400 Received: from rhun.apana.org.au ([64.62.148.172]:41648 "EHLO arnor.apana.org.au" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752518AbZDICf6 (ORCPT ); Wed, 8 Apr 2009 22:35:58 -0400 Date: Thu, 9 Apr 2009 10:35:47 +0800 From: Herbert Xu To: Maciej Rutecki Cc: Linux Kernel Mailing List , "Rafael J. Wysocki" , davem@davemloft.net, linux-crypto@vger.kernel.org, arjan@linux.intel.com, Linus Torvalds , Andrew Morton , Rusty Russell , Jiri Slaby Subject: Re: [2.6.30-rc1] device-mapper: table: 254:0: crypt: Error allocating crypto tfm Message-ID: <20090409023547.GA1878@gondor.apana.org.au> References: <8db1092f0904081235x58081f1by842ab45ad861e294@mail.gmail.com> <20090409021804.GA1756@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090409021804.GA1756@gondor.apana.org.au> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1935 Lines: 52 On Thu, Apr 09, 2009 at 10:18:04AM +0800, Herbert Xu wrote: > > It looks like try_then_request_module has been broken such that it > returns without waiting for the module to complete loading. I'm > looking into it. OK, it's caused by commit acae05156551fd7528fbb616271e672789388e3c Author: Arjan van de Ven Date: Sun Feb 8 10:42:01 2009 -0800 module: create a request_module_nowait() This should fix it. module: try_then_request_module must wait Since the whole point of try_then_request_module is to retry the operation after a module has been loaded, we must wait for the module to fully load. Otherwise all sort of things start breaking, e.g., you won't be able to read your encrypted disks on the first attempt. Signed-off-by: Herbert Xu diff --git a/include/linux/kmod.h b/include/linux/kmod.h index d5fa565..384ca8b 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h @@ -34,7 +34,7 @@ extern int __request_module(bool wait, const char *name, ...) \ #define request_module(mod...) __request_module(true, mod) #define request_module_nowait(mod...) __request_module(false, mod) #define try_then_request_module(x, mod...) \ - ((x) ?: (__request_module(false, mod), (x))) + ((x) ?: (__request_module(true, mod), (x))) #else static inline int request_module(const char *name, ...) { return -ENOSYS; } static inline int request_module_nowait(const char *name, ...) { return -ENOSYS; } Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/