From patchwork Fri May 26 10:12:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Mueller X-Patchwork-Id: 9750315 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8D9A360246 for ; Fri, 26 May 2017 10:12:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A4972811A for ; Fri, 26 May 2017 10:12:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6EF4C283AF; Fri, 26 May 2017 10:12:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CADE2811A for ; Fri, 26 May 2017 10:12:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S971118AbdEZKMy (ORCPT ); Fri, 26 May 2017 06:12:54 -0400 Received: from mail.eperm.de ([89.247.134.16]:59696 "EHLO mail.eperm.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1764256AbdEZKMy (ORCPT ); Fri, 26 May 2017 06:12:54 -0400 Received: from positron.chronox.de (140-211-63-86.vybezek.net [86.63.211.140]) by mail.eperm.de (Postfix) with ESMTPA id AEEA1181607D; Fri, 26 May 2017 12:12:51 +0200 (CEST) From: Stephan =?ISO-8859-1?Q?M=FCller?= To: Harsh Jain Cc: Herbert Xu , linux-crypto@vger.kernel.org Subject: Re: [PATCH 1/1] crypto:drbg- Fixes panic in wait_for_completion call. Date: Fri, 26 May 2017 12:12:51 +0200 Message-ID: <12466881.1IDO9Q7xg5@positron.chronox.de> In-Reply-To: References: MIME-Version: 1.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Am Donnerstag, 25. Mai 2017, 17:23:47 CEST schrieb Harsh Jain: Hi Harsh, > Initialise ctr_completion variable before use. Thank you very much for catching this. But I think the chosen function is wrong. When we have an HMAC or Hash DRBG, this completion function does not need to be initialized. May I ask you to check this patch? Ciao Stephan ---8<--- From 1ec5f753644eb9005ad758c9bfd75032602c9727 Mon Sep 17 00:00:00 2001 From: Stephan Mueller Date: Fri, 26 May 2017 12:11:31 +0200 Subject: [PATCH] crypto: drbg- Fixes panic in wait_for_completion call Initialise ctr_completion variable before use. Signed-off-by: Harsh Jain Signed-off-by: Stephan Mueller --- crypto/drbg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/crypto/drbg.c b/crypto/drbg.c index fa749f4..433c425 100644 --- a/crypto/drbg.c +++ b/crypto/drbg.c @@ -1691,6 +1691,7 @@ static int drbg_init_sym_kernel(struct drbg_state *drbg) return PTR_ERR(sk_tfm); } drbg->ctr_handle = sk_tfm; + init_completion(&drbg->ctr_completion); req = skcipher_request_alloc(sk_tfm, GFP_KERNEL); if (!req) {