summaryrefslogtreecommitdiff
path: root/kernel/rcu
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-09-23 17:26:34 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-26 10:01:05 +0100
commite4e32af72d0cd26d1ca291a85b6e5e6e7b0dd576 (patch)
treeeb5215951577374f1fc7de3f811f87d27cb8848d /kernel/rcu
parent220ba320861c7368159b5c80b7dc7418e4ea5d8b (diff)
downloadlinux-stable-e4e32af72d0cd26d1ca291a85b6e5e6e7b0dd576.tar.gz
rcu: Fix uninitialized variable in nocb_gp_wait()
[ Upstream commit b8889c9c89a2655a231dfed93cc9bdca0930ea67 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'kernel/rcu')
-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;