All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harsh Jain <harshjain.prof@gmail.com>
To: "Stephan Müller" <smueller@chronox.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>, linux-crypto@vger.kernel.org
Subject: Re: [PATCH 1/1] crypto:drbg- Fixes panic in wait_for_completion call.
Date: Fri, 26 May 2017 16:09:53 +0530	[thread overview]
Message-ID: <CAFXBA=mHNK6-eWnuz-u1EaLBjusvKKwuJP4VvZbDPvUgwGYjEw@mail.gmail.com> (raw)
In-Reply-To: <12466881.1IDO9Q7xg5@positron.chronox.de>

On Fri, May 26, 2017 at 3:42 PM, Stephan Müller <smueller@chronox.de> wrote:
> 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?
Yup, Its working.
>
> Ciao
> Stephan
>
> ---8<---
>
> From 1ec5f753644eb9005ad758c9bfd75032602c9727 Mon Sep 17 00:00:00 2001
> From: Stephan Mueller <smueller@chronox.de>
> 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 <harshjain.prof@gmail.com>
> Signed-off-by: Stephan Mueller <smueller@chronox.de>
> ---
>  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) {
> --
> 2.9.3
>
>

  reply	other threads:[~2017-05-26 10:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-25 15:23 [PATCH 1/1] crypto:drbg- Fixes panic in wait_for_completion call Harsh Jain
2017-05-26 10:12 ` Stephan Müller
2017-05-26 10:39   ` Harsh Jain [this message]
2017-06-10  4:17   ` Herbert Xu
2017-06-12  6:30     ` Harsh Jain
2017-06-22  8:59       ` 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='CAFXBA=mHNK6-eWnuz-u1EaLBjusvKKwuJP4VvZbDPvUgwGYjEw@mail.gmail.com' \
    --to=harshjain.prof@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=smueller@chronox.de \
    /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.