mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	tglx@linutronix.de, Ingo Molnar <mingo@kernel.org>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] random: Remove preempt disabled region
Date: Sun, 22 Jul 2018 10:52:06 -0400	[thread overview]
Message-ID: <20180722145206.GA6685@thunk.org> (raw)
In-Reply-To: <20180711143721.18378-1-bigeasy@linutronix.de>

On Wed, Jul 11, 2018 at 04:37:21PM +0200, Sebastian Andrzej Siewior wrote:
> From: Ingo Molnar <mingo@elte.hu>
> 
> No need to keep preemption disabled across the whole function.
> 
> mix_pool_bytes() uses a spin_lock() to protect the pool and there are
> other places like write_pool() whhich invoke mix_pool_bytes() without
> disabling preemption.
> credit_entropy_bits() is invoked from other places like
> add_hwgenerator_randomness() without disabling preemption.
> 
> Before commit 95b709b6be49 ("random: drop trickle mode") the function
> used __this_cpu_inc_return() which would require disabled preemption.
> The preempt_disable() section was added in commit 43d5d3018c37 ("[PATCH]
> random driver preempt robustness", history tree).  It was claimed that
> the code relied on "vt_ioctl() being called under BKL".
> 
> Cc: "Theodore Ts'o" <tytso@mit.edu>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> [bigeasy: enhance the commit message]
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Applied, thanks.

					- Ted

      reply	other threads:[~2018-07-22 15:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-11 14:37 Sebastian Andrzej Siewior
2018-07-22 14:52 ` Theodore Y. Ts'o [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=20180722145206.GA6685@thunk.org \
    --to=tytso@mit.edu \
    --cc=arnd@arndb.de \
    --cc=bigeasy@linutronix.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome