Commit b8889c9c authored by Dan Carpenter's avatar Dan Carpenter Committed by Paul E. McKenney
Browse files

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: 5d6742b3 ("rcu/nocb: Use rcu_segcblist for no-CBs CPUs")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
parent 7cc0fffd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;