rcutorture: Properly synchronize with OOM notifier
authorPaul E. McKenney <paulmck@kernel.org>
Mon, 20 Jul 2020 15:34:07 +0000 (08:34 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Tue, 25 Aug 2020 01:45:34 +0000 (18:45 -0700)
commit57f602022e82ee8fa6476d0e16ddbaf3eb86b245
treeace173a1ae1cfd355422f80ec8211806e34aa34d
parentc8fa63714763b7795a3f5fb7ed6d000763e6dccc
rcutorture: Properly synchronize with OOM notifier

The current rcutorture forward-progress code assumes that it is the
only cause of out-of-memory (OOM) events.  For script-based rcutorture
testing, this assumption is in fact correct.  However, testing based
on modprobe/rmmod might well encounter external OOM events, which could
happen at any time.

This commit therefore properly synchronizes the interaction between
rcutorture's forward-progress testing and its OOM notifier by adding a
global mutex.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/rcutorture.c