diff options
author | Paul E. McKenney <paulmck@kernel.org> | 2020-09-24 01:46:36 +0200 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2020-11-07 02:13:55 +0100 |
commit | 293b93d66f149a9bd124aae195f048268e11870c (patch) | |
tree | afe49564cd3cf1357745314c5730b2477b487289 /kernel/rcu/rcutorture.c | |
parent | torture: Accept time units on kvm.sh --duration argument (diff) | |
download | linux-293b93d66f149a9bd124aae195f048268e11870c.tar.xz linux-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.c | 4 |
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; } |