Skip to content

Commit b8889c9

Browse files
Dan Carpenterpaulmckrcu
authored andcommitted
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: 5d6742b ("rcu/nocb: Use rcu_segcblist for no-CBs CPUs") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 7cc0fff commit b8889c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/rcu/tree_plugin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1946,7 +1946,7 @@ static void nocb_gp_wait(struct rcu_data *my_rdp)
19461946
int __maybe_unused cpu = my_rdp->cpu;
19471947
unsigned long cur_gp_seq;
19481948
unsigned long flags;
1949-
bool gotcbs;
1949+
bool gotcbs = false;
19501950
unsigned long j = jiffies;
19511951
bool needwait_gp = false; // This prevents actual uninitialized use.
19521952
bool needwake;

0 commit comments

Comments
 (0)