rcu/segcblist: Add debug checks for segment lengths
authorJoel Fernandes (Google) <joel@joelfernandes.org>
Wed, 18 Nov 2020 16:15:41 +0000 (11:15 -0500)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 7 Jan 2021 00:24:19 +0000 (16:24 -0800)
commitb4e6039e8af8c20dfbbdfcaebfcbd7c9d9ffe713
treea739b9f1aef750d312a7b0002a8db189c197477e
parent3afe7fa535491ecd0382c3968dc2349602bff8a2
rcu/segcblist: Add debug checks for segment lengths

This commit adds debug checks near the end of rcu_do_batch() that emit
warnings if an empty rcu_segcblist structure has non-zero segment counts,
or, conversely, if a non-empty structure has all-zero segment counts.

Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
[ paulmck: Fix queue/segment-length checks. ]
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/rcu_segcblist.c
kernel/rcu/rcu_segcblist.h
kernel/rcu/tree.c