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

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
...@@ -1821,7 +1821,7 @@ rcu_torture_init(void) ...@@ -1821,7 +1821,7 @@ rcu_torture_init(void)
if (firsterr) if (firsterr)
goto unwind; goto unwind;
} }
if (test_no_idle_hz) { if (test_no_idle_hz && shuffle_interval > 0) {
firsterr = torture_shuffle_init(shuffle_interval * HZ); firsterr = torture_shuffle_init(shuffle_interval * HZ);
if (firsterr) if (firsterr)
goto unwind; goto unwind;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment