aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcu/rcutorture.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2020-09-23 16:46:36 -0700
committerPaul E. McKenney <paulmck@kernel.org>2020-11-06 17:13:55 -0800
commit293b93d66f149a9bd124aae195f048268e11870c (patch)
treeafe49564cd3cf1357745314c5730b2477b487289 /kernel/rcu/rcutorture.c
parenttorture: Accept time units on kvm.sh --duration argument (diff)
downloadlinux-dev-293b93d66f149a9bd124aae195f048268e11870c.tar.xz
linux-dev-293b93d66f149a9bd124aae195f048268e11870c.zip
rcutorture: Small code cleanups
The rcu_torture_cleanup() function fails to NULL out the reader_tasks pointer after freeing it and its fakewriter_tasks loop has redundant braces. This commit therefore cleans these up. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to '')
-rw-r--r--kernel/rcu/rcutorture.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 4391d2fab5de..e7d52fded3cd 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -2496,13 +2496,13 @@ rcu_torture_cleanup(void)
torture_stop_kthread(rcu_torture_reader,
reader_tasks[i]);
kfree(reader_tasks);
+ reader_tasks = NULL;
}
if (fakewriter_tasks) {
- for (i = 0; i < nfakewriters; i++) {
+ for (i = 0; i < nfakewriters; i++)
torture_stop_kthread(rcu_torture_fakewriter,
fakewriter_tasks[i]);
- }
kfree(fakewriter_tasks);
fakewriter_tasks = NULL;
}