rcutorture: Properly set rcu_fwds for OOM handling
authorPaul E. McKenney <paulmck@kernel.org>
Sun, 19 Jul 2020 21:40:31 +0000 (14:40 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Tue, 25 Aug 2020 01:45:34 +0000 (18:45 -0700)
commitc8fa63714763b7795a3f5fb7ed6d000763e6dccc
tree7da884bfa34d69c2cfd948d6991e6781cda254f4
parent5461808889405de254ab3370aa7f07ac0b6cb938
rcutorture: Properly set rcu_fwds for OOM handling

The conversion of rcu_fwds to dynamic allocation failed to actually
allocate the required structure.  This commit therefore allocates it,
frees it, and updates rcu_fwds accordingly.  While in the area, it
abstracts the cleanup actions into rcu_torture_fwd_prog_cleanup().

Fixes: 5155be9994e5 ("rcutorture: Dynamically allocate rcu_fwds structure")
Reported-by: kernel test robot <rong.a.chen@intel.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/rcutorture.c