mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rong Chen <rong.a.chen@intel.com>
To: Theodore Ts'o <tytso@mit.edu>,
	linux-kernel@vger.kernel.org, LKP <lkp@01.org>
Subject: Re: eb9d1bf079 [ 88.881528] EIP: _random_read
Date: Tue, 28 May 2019 08:19:04 +0800	[thread overview]
Message-ID: <5408d2e0-53ec-55ee-3ad5-b6c797a9cf5a@intel.com> (raw)
In-Reply-To: <20190522162444.GB2744@mit.edu>


On 5/23/19 12:24 AM, Theodore Ts'o wrote:
> Can you check and see if this addresses the issue?  I'm not able to
> easily repro the softlockup.

Hi,

The patch could fix the issue in our testing environment.

Best Regards,
Rong Chen


>
> Thanks!
>
> 						- Ted
>
> commit f93d3e94983bf8b4697ceb121c79afd941862860
> Author: Theodore Ts'o <tytso@mit.edu>
> Date:   Wed May 22 12:02:16 2019 -0400
>
>      random: fix soft lockup when trying to read from an uninitialized blocking pool
>      
>      Fixes: eb9d1bf079bb: "random: only read from /dev/random after its pool has received 128 bits"
>      Reported-by: kernel test robot <lkp@intel.com>
>      Signed-off-by: Theodore Ts'o <tytso@mit.edu>
>
> diff --git a/drivers/char/random.c b/drivers/char/random.c
> index a42b3d764da8..9cea93d0bfb3 100644
> --- a/drivers/char/random.c
> +++ b/drivers/char/random.c
> @@ -1936,8 +1936,8 @@ _random_read(int nonblock, char __user *buf, size_t nbytes)
>   			return -EAGAIN;
>   
>   		wait_event_interruptible(random_read_wait,
> -			ENTROPY_BITS(&input_pool) >=
> -			random_read_wakeup_bits);
> +		    blocking_pool.initialized &&
> +		    (ENTROPY_BITS(&input_pool) >= random_read_wakeup_bits));
>   		if (signal_pending(current))
>   			return -ERESTARTSYS;
>   	}

      reply	other threads:[~2019-05-28  0:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-16  7:14 kernel test robot
2019-05-22 16:24 ` Theodore Ts'o
2019-05-28  0:19   ` Rong Chen [this message]

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=5408d2e0-53ec-55ee-3ad5-b6c797a9cf5a@intel.com \
    --to=rong.a.chen@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@01.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

all inboxes | Powered by JetHome®