From: Sebastian Ott <sebott@linux.ibm.com>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [BUG, PATCH] random: sleep in irq context
Date: Mon, 23 Apr 2018 18:44:19 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.21.1804231843240.1675@schleppi> (raw)
In-Reply-To: <alpine.LFD.2.21.1804231518060.1767@schleppi>
On Mon, 23 Apr 2018, Sebastian Ott wrote:
> From 9d29e0c92efaf94277bc178782523283958ae8c8 Mon Sep 17 00:00:00 2001
> From: Sebastian Ott <sebott@linux.ibm.com>
> Date: Mon, 23 Apr 2018 14:59:20 +0200
> Subject: [PATCH] random: don't sleep during allocations in irq context
>
> Since numa_crng_init() can be called from irq context let's
> use __GFP_ATOMIC for allocations.
>
> Fixes: 8ef35c866f88 ("random: set up the NUMA crng instances...")
> Signed-off-by: Sebastian Ott <sebott@linux.ibm.com>
> ---
> drivers/char/random.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/char/random.c b/drivers/char/random.c
> index 3cd3aae24d6d..e96ea2bf7241 100644
> --- a/drivers/char/random.c
> +++ b/drivers/char/random.c
> @@ -791,14 +791,14 @@ static void crng_initialize(struct crng_state *crng)
> #ifdef CONFIG_NUMA
> static void numa_crng_init(void)
> {
> + gfp_t gfp_flags = GFP_KERNEL | __GFP_NOFAIL | __GFP_ATOMIC;
I should have removed GFP_KERNEL here...
next prev parent reply other threads:[~2018-04-23 16:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-23 13:40 Sebastian Ott
2018-04-23 16:44 ` Sebastian Ott [this message]
2018-04-24 8:40 ` Sebastian Ott
2018-04-24 15:55 ` Theodore Y. Ts'o
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=alpine.LFD.2.21.1804231843240.1675@schleppi \
--to=sebott@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
/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
Powered by JetHome