aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/rcutree.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index d145796bd61f..e0d98157fbea 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -2938,6 +2938,10 @@ static void __init rcu_init_one(struct rcu_state *rsp,
2938 2938
2939 BUILD_BUG_ON(MAX_RCU_LVLS > ARRAY_SIZE(buf)); /* Fix buf[] init! */ 2939 BUILD_BUG_ON(MAX_RCU_LVLS > ARRAY_SIZE(buf)); /* Fix buf[] init! */
2940 2940
2941 /* Silence gcc 4.8 warning about array index out of range. */
2942 if (rcu_num_lvls > RCU_NUM_LVLS)
2943 panic("rcu_init_one: rcu_num_lvls overflow");
2944
2941 /* Initialize the level-tracking arrays. */ 2945 /* Initialize the level-tracking arrays. */
2942 2946
2943 for (i = 0; i < rcu_num_lvls; i++) 2947 for (i = 0; i < rcu_num_lvls; i++)