[<prev] [next>] [day] [month] [year] [list]
Message-ID: <157252289686.29376.9139091896434692526.tip-bot2@tip-bot2>
Date: Thu, 31 Oct 2019 11:54:56 -0000
From: "tip-bot2 for Dan Carpenter" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Dan Carpenter <dan.carpenter@...cle.com>,
"Paul E. McKenney" <paulmck@...nel.org>,
Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...en8.de>,
linux-kernel@...r.kernel.org
Subject: [tip: core/rcu] rcu: Fix uninitialized variable in nocb_gp_wait()
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@...cle.com>
AuthorDate: Mon, 23 Sep 2019 17:26:34 +03:00
Committer: Paul E. McKenney <paulmck@...nel.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@...cle.com>
Signed-off-by: Paul E. McKenney <paulmck@...nel.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;
Powered by blists - more mailing lists