Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8e255f7 authored by Paul E. McKenney's avatar Paul E. McKenney
Browse files

rcutorture: Bounds-check rcutorture.shuffle_interval



Specifying a negative rcutorture.shuffle_interval value will cause a
negative value to be used as a sleep time.  This commit therefore
refuses to start shuffling unless the rcutorture.shuffle_interval
value is greater than zero.

Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
parent 4444d852
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1821,7 +1821,7 @@ rcu_torture_init(void)
		if (firsterr)
			goto unwind;
	}
	if (test_no_idle_hz) {
	if (test_no_idle_hz && shuffle_interval > 0) {
		firsterr = torture_shuffle_init(shuffle_interval * HZ);
		if (firsterr)
			goto unwind;