[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180722145206.GA6685@thunk.org>
Date: Sun, 22 Jul 2018 10:52:06 -0400
From: "Theodore Y. Ts'o" <tytso@....edu>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: linux-kernel@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
tglx@...utronix.de, Ingo Molnar <mingo@...nel.org>,
Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH] random: Remove preempt disabled region
On Wed, Jul 11, 2018 at 04:37:21PM +0200, Sebastian Andrzej Siewior wrote:
> From: Ingo Molnar <mingo@...e.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@....edu>
> Signed-off-by: Ingo Molnar <mingo@...e.hu>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> [bigeasy: enhance the commit message]
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Applied, thanks.
- Ted
Powered by blists - more mailing lists