linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [tip: core/rcu] rcu: Fix uninitialized variable in nocb_gp_wait()
@ 2019-10-31 11:54 tip-bot2 for Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: tip-bot2 for Dan Carpenter @ 2019-10-31 11:54 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Dan Carpenter, Paul E. McKenney, Ingo Molnar, Borislav Petkov,
	linux-kernel

The following commit has been merged into the core/rcu branch of tip:

Commit-ID:     b8889c9c89a2655a231dfed93cc9bdca0930ea67
Gitweb:        https://git.kernel.org/tip/b8889c9c89a2655a231dfed93cc9bdca0930ea67
Author:        Dan Carpenter <dan.carpenter@oracle.com>
AuthorDate:    Mon, 23 Sep 2019 17:26:34 +03:00
Committer:     Paul E. McKenney <paulmck@kernel.org>
CommitterDate: Wed, 30 Oct 2019 08:34:53 -07:00

rcu: Fix uninitialized variable in nocb_gp_wait()

We never set this to false.  This probably doesn't affect most people's
runtime because GCC will automatically initialize it to false at certain
common optimization levels.  But that behavior is related to a bug in
GCC and obviously should not be relied on.

Fixes: 5d6742b37727 ("rcu/nocb: Use rcu_segcblist for no-CBs CPUs")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 kernel/rcu/tree_plugin.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 2defc7f..fa08d55 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -1946,7 +1946,7 @@ static void nocb_gp_wait(struct rcu_data *my_rdp)
 	int __maybe_unused cpu = my_rdp->cpu;
 	unsigned long cur_gp_seq;
 	unsigned long flags;
-	bool gotcbs;
+	bool gotcbs = false;
 	unsigned long j = jiffies;
 	bool needwait_gp = false; // This prevents actual uninitialized use.
 	bool needwake;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-10-31 11:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-31 11:54 [tip: core/rcu] rcu: Fix uninitialized variable in nocb_gp_wait() tip-bot2 for Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).