From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751770AbeETUGR (ORCPT ); Sun, 20 May 2018 16:06:17 -0400 Received: from mo4-p01-ob.smtp.rzone.de ([81.169.146.167]:25752 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751656AbeETUGO (ORCPT ); Sun, 20 May 2018 16:06:14 -0400 X-RZG-AUTH: ":P2ERcEykfu11Y98lp/T7+hdri+uKZK8TKWEqNyiHySGSa9k9zW4DNhHoQE+naq7U0Y+oJw372u0STleFxYicB5ZQNmFJTQ3JS+3E3w==" X-RZG-CLASS-ID: mo00 From: Stephan =?ISO-8859-1?Q?M=FCller?= To: Geert Uytterhoeven Cc: Herbert Xu , "David S. Miller" , Linux Crypto Mailing List , Linux Kernel Mailing List Subject: Re: cryptomgr_test / drbg_ctr: BUG: sleeping function called from invalid context Date: Sun, 20 May 2018 21:54:07 +0200 Message-ID: <14009987.cibGRJrWdm@positron.chronox.de> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Freitag, 18. Mai 2018, 10:36:04 CEST schrieb Geert Uytterhoeven: Hi Geert, > > I tried following the code path, but couldn't find where it went wrong. > > mutex_lock(&drbg->drbg_mutex) is called from drbg_instantiate(), which is > inlined by the compiler into drbg_kcapi_seed(). > > Do you have a clue? It is the first time I hear from such an issue. Yes, the DRBG should not be called in atomic context. But I do not see where we have an atomic context (either a spin_lock or in an interrupt handler) when we are executing the test manager. I will keep looking. Ciao Stephan