[<prev] [next>] [day] [month] [year] [list]
Message-ID: <160788606789.3364.13277474191983409443.tip-bot2@tip-bot2>
Date: Sun, 13 Dec 2020 19:01:07 -0000
From: "tip-bot2 for Paul E. McKenney" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: "Paul E. McKenney" <paulmck@...nel.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: core/rcu] rcutorture: Small code cleanups
The following commit has been merged into the core/rcu branch of tip:
Commit-ID: 293b93d66f149a9bd124aae195f048268e11870c
Gitweb: https://git.kernel.org/tip/293b93d66f149a9bd124aae195f048268e11870c
Author: Paul E. McKenney <paulmck@...nel.org>
AuthorDate: Wed, 23 Sep 2020 16:46:36 -07:00
Committer: Paul E. McKenney <paulmck@...nel.org>
CommitterDate: Fri, 06 Nov 2020 17:13:55 -08:00
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@...nel.org>
---
kernel/rcu/rcutorture.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 4391d2f..e7d52fd 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;
}
Powered by blists - more mailing lists