Skip to content

Commit 66ea102

Browse files
qiangzh3paulmckrcu
authored andcommitted
srcu: Release early_srcu resources when no longer in use
Kernels built with the CONFIG_TREE_SRCU Kconfig option set and then booted with rcupdate.rcu_self_test=1 and srcutree.convert_to_big=1 will test Tree SRCU during early boot. The early_srcu structure's srcu_node array will be allocated when init_srcu_struct_fields() is invoked, but after the test completes this early_srcu structure will not be used. This commit therefore invokes cleanup_srcu_struct() to free that srcu_node structure. Signed-off-by: Zqiang <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 1b929c0 commit 66ea102

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/rcu/update.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,7 @@ static int rcu_verify_early_boot_tests(void)
586586
early_boot_test_counter++;
587587
srcu_barrier(&early_srcu);
588588
WARN_ON_ONCE(!poll_state_synchronize_srcu(&early_srcu, early_srcu_cookie));
589+
cleanup_srcu_struct(&early_srcu);
589590
}
590591
if (rcu_self_test_counter != early_boot_test_counter) {
591592
WARN_ON(1);

0 commit comments

Comments
 (0)