rcutorture: Don't do need_resched() testing if ->sync is NULL
authorPaul E. McKenney <paulmck@kernel.org>
Sat, 10 Oct 2020 02:51:55 +0000 (19:51 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Sat, 7 Nov 2020 01:13:57 +0000 (17:13 -0800)
commita7eb937b67b64b8b4645f1ebca3ac2079c6de81b
tree37a9c9aa377bef48b7075450da31cee4590c1a80
parent0d7202876bcb968a68f5608b9ff7a824fbc7e94d
rcutorture: Don't do need_resched() testing if ->sync is NULL

If cur_ops->sync is NULL, rcu_torture_fwd_prog_nr() will nevertheless
attempt to call through it.  This commit therefore flags cases where
neither need_resched() nor call_rcu() forward-progress testing
can be performed due to NULL function pointers, and also causes
rcu_torture_fwd_prog_nr() to take an early exit if cur_ops->sync()
is NULL.

Reported-by: Tom Rix <trix@redhat.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/rcutorture.c