]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rcutorture: Don't do busted forward-progress testing
authorPaul E. McKenney <paulmck@linux.ibm.com>
Tue, 16 Oct 2018 12:46:58 +0000 (05:46 -0700)
committerPaul E. McKenney <paulmck@linux.ibm.com>
Sat, 1 Dec 2018 20:45:42 +0000 (12:45 -0800)
The "busted" rcutorture type is an intentionally broken implementation
of RCU.  Doing forward-progress testing on this implementation is not
particularly meaningful on the one hand and can result in fatal abuse
of the memory allocator on the other.  This commit therefore disables
forward-progress testing of the "busted" rcutorture type.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
kernel/rcu/rcutorture.c

index a4c4a24bdcaa9f335d12b3ad0391f6b5cab90606..f6e85faa4ff4b33cb7c8170d029d470ca9f1065a 100644 (file)
@@ -1900,7 +1900,8 @@ static int __init rcu_torture_fwd_prog_init(void)
 {
        if (!fwd_progress)
                return 0; /* Not requested, so don't do it. */
-       if (!cur_ops->stall_dur || cur_ops->stall_dur() <= 0) {
+       if (!cur_ops->stall_dur || cur_ops->stall_dur() <= 0 ||
+           cur_ops == &rcu_busted_ops) {
                VERBOSE_TOROUT_STRING("rcu_torture_fwd_prog_init: Disabled, unsupported by RCU flavor under test");
                return 0;
        }