summaryrefslogtreecommitdiffstats
path: root/kernel/rcu
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-05-14 16:55:45 -0700
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-07-15 14:47:16 -0700
commite8e255f7191fb6491dd1d96cfbbe19981f6eb3dd (patch)
treea332efa81a1c9667b5f9974a1a523b21c7f91e6f /kernel/rcu
parent4444d852a99b8f0310f369da8473ec3639e380a7 (diff)
downloadop-kernel-dev-e8e255f7191fb6491dd1d96cfbbe19981f6eb3dd.zip
op-kernel-dev-e8e255f7191fb6491dd1d96cfbbe19981f6eb3dd.tar.gz
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: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu')
-rw-r--r--kernel/rcu/rcutorture.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 2cbe569..1cead78 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -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;
OpenPOWER on IntegriCloud