rcutorture: Check for immediate deboosting at reader end

This commit adds a check for failure to have fully deboosted a
multi-segmented RCU reader at the end of the full read-side critical
section.  This check only happens for fully task-level readers, because a
reader in a handler might have interrupted an already-boosted task-level
RCU reader, which would result in false positives.

Although most uses of RCU priority boosting serve as debugging aids,
this might change, and in fact might already have changed.  And allowing
(for example) RCU priority boosting to persist until the next scheduler
tick could cause an aggressively real-time system to miss sub-millisecond
deadlines.  So we do need to find this sort of problem during testing,
and preferably not in the field.

The name and type of the rcu_torture_ops function pointer may need to
change should other end-of-reader checks be needed.  But let's start
simple.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
3 files changed