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

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

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: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
parent d770e558
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1507,7 +1507,7 @@ static int rcu_torture_barrier_init(void)
	int i;
	int ret;

	if (n_barrier_cbs == 0)
	if (n_barrier_cbs <= 0)
		return 0;
	if (cur_ops->call == NULL || cur_ops->cb_barrier == NULL) {
		pr_alert("%s" TORTURE_FLAG