diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-05-14 18:35:43 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-07-15 17:47:14 -0400 |
commit | d9eba768839ac24e47606af36e50c14f10c2211c (patch) | |
tree | c4afbae3056125dff0a4770c26a717a595d92e99 /kernel/rcu/rcutorture.c | |
parent | d770e558e21961ad6cfdf0ff7df0eb5d7d4f0754 (diff) |
rcutorture: Better bounds checking for n_barrier_cbs
A negative value for rcutorture.n_barrier_cbs can pass a negative value
to the memory allocator, so this commit instead causes rcu_barrier()
testing to be disabled in this case.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu/rcutorture.c')
-rw-r--r-- | kernel/rcu/rcutorture.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index 59e32684c23b..7e29a3266139 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c | |||
@@ -1507,7 +1507,7 @@ static int rcu_torture_barrier_init(void) | |||
1507 | int i; | 1507 | int i; |
1508 | int ret; | 1508 | int ret; |
1509 | 1509 | ||
1510 | if (n_barrier_cbs == 0) | 1510 | if (n_barrier_cbs <= 0) |
1511 | return 0; | 1511 | return 0; |
1512 | if (cur_ops->call == NULL || cur_ops->cb_barrier == NULL) { | 1512 | if (cur_ops->call == NULL || cur_ops->cb_barrier == NULL) { |
1513 | pr_alert("%s" TORTURE_FLAG | 1513 | pr_alert("%s" TORTURE_FLAG |