summaryrefslogtreecommitdiff
path: root/include/linux/random.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2018-07-22 10:51:50 -0400
committerTheodore Ts'o <tytso@mit.edu>2018-07-24 15:44:32 -0400
commitb34fbaa9289328c7aec67d2b8b8b7d02bc61c67d (patch)
tree856e8498c1293498a443b2007759cd36f54a5df6 /include/linux/random.h
parent39a8883a2b989d1d21bd8dd99f5557f0c5e89694 (diff)
random: remove preempt disabled region
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> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'include/linux/random.h')
0 files changed, 0 insertions, 0 deletions