summaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorAlexander Gordeev <agordeev@redhat.com>2015-06-03 08:18:27 +0200
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-07-15 14:45:16 -0700
commita6d77081e266605c9f4d8c11e0ee00468b9dc614 (patch)
treeb9f200361754e95386e1464a6e21ee1346fb0e82 /kernel/fork.c
parent9618138b09260e3df5af5a0d7bdc8fca010f6a3f (diff)
downloadlinux-a6d77081e266605c9f4d8c11e0ee00468b9dc614.tar.bz2
rcu: Limit rcu_state::levelcnt[] to RCU_NUM_LVLS items
Variable rcu_num_lvls is limited by RCU_NUM_LVLS macro. In turn, rcu_state::levelcnt[] array is never accessed beyond rcu_num_lvls. Thus, rcu_state::levelcnt[] is safe to limit to RCU_NUM_LVLS items. Since rcu_num_lvls could be changed during boot (as result of rcutree.rcu_fanout_leaf kernel parameter update) one might assume a new value could overflow the value of RCU_NUM_LVLS. However, that is not the case, since leaf-level fanout is only permitted to increase, resulting in rcu_num_lvls possibly to decrease. Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Alexander Gordeev <agordeev@redhat.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/fork.c')
0 files changed, 0 insertions, 0 deletions