summaryrefslogtreecommitdiffstats
path: root/kernel/rcu/tree_plugin.h
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-09-23 17:26:34 +0300
committerPaul E. McKenney <paulmck@kernel.org>2019-10-30 08:34:53 -0700
commitb8889c9c89a2655a231dfed93cc9bdca0930ea67 (patch)
tree073cd06841e13ee7e6f6ef3a1a4de805b3e984b5 /kernel/rcu/tree_plugin.h
parent7cc0fffde6e4ff76be20d41a3577012fe584a559 (diff)
downloadlinux-b8889c9c89a2655a231dfed93cc9bdca0930ea67.tar.bz2
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>
Diffstat (limited to 'kernel/rcu/tree_plugin.h')
-rw-r--r--kernel/rcu/tree_plugin.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 2defc7fe74c3..fa08d55f7040 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;