diff options
author | Scott Wood <swood@redhat.com> | 2021-08-20 10:42:36 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-11-18 16:03:52 +0300 |
commit | 7f43cda650d5ca7cac9ced26bb2f3f64643ddb9d (patch) | |
tree | 3eb70970377baaffb51b9f0f3a18b3ce03e6834a /arch/mips/dec/setup.c | |
parent | 7987f31e54a2a453c54bdc516fe7a48035fddf03 (diff) | |
download | linux-7f43cda650d5ca7cac9ced26bb2f3f64643ddb9d.tar.xz |
rcutorture: Avoid problematic critical section nesting on PREEMPT_RT
[ Upstream commit 71921a9606ddbcc1d98c00eca7ae82c373d1fecd ]
rcutorture is generating some nesting scenarios that are not compatible on PREEMPT_RT.
For example:
preempt_disable();
rcu_read_lock_bh();
preempt_enable();
rcu_read_unlock_bh();
The problem here is that on PREEMPT_RT the bottom halves have to be
disabled and enabled in preemptible context.
Reorder locking: start with BH locking and continue with then with
disabling preemption or interrupts. In the unlocking do it reverse by
first enabling interrupts and preemption and BH at the very end.
Ensure that on PREEMPT_RT BH locking remains unchanged if in
non-preemptible context.
Link: https://lkml.kernel.org/r/20190911165729.11178-6-swood@redhat.com
Link: https://lkml.kernel.org/r/20210819182035.GF4126399@paulmck-ThinkPad-P17-Gen-1
Signed-off-by: Scott Wood <swood@redhat.com>
[bigeasy: Drop ATOM_BH, make it only about changing BH in atomic
context. Allow enabling RCU in IRQ-off section. Reword commit message.]
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/mips/dec/setup.c')
0 files changed, 0 insertions, 0 deletions