summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/rcu/tree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index c34422d92aa9..9b076b284695 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -3982,9 +3982,9 @@ static void __init rcu_init_one(struct rcu_state *rsp,
3982 3982
3983 BUILD_BUG_ON(MAX_RCU_LVLS > ARRAY_SIZE(buf)); /* Fix buf[] init! */ 3983 BUILD_BUG_ON(MAX_RCU_LVLS > ARRAY_SIZE(buf)); /* Fix buf[] init! */
3984 3984
3985 /* Silence gcc 4.8 warning about array index out of range. */ 3985 /* Silence gcc 4.8 false positive about array index out of range. */
3986 if (rcu_num_lvls > RCU_NUM_LVLS) 3986 if (rcu_num_lvls <= 0 || rcu_num_lvls > RCU_NUM_LVLS)
3987 panic("rcu_init_one: rcu_num_lvls overflow"); 3987 panic("rcu_init_one: rcu_num_lvls out of range");
3988 3988
3989 /* Initialize the level-tracking arrays. */ 3989 /* Initialize the level-tracking arrays. */
3990 3990