scftorture changes for v6.13

o	Avoid divide operation.

o	Fix cleanup code waiting for IPI handlers.

o	Move memory allocations out of preempt-disable region of code
	for PREEMPT_RT compatibility.

o	Use a lockless list to avoid freeing memory while interrupts
	are disabled, again for PREEMPT_RT compatibility.

o	Make lockless list scf_add_to_free_list() correctly handle
	freeing a NULL pointer.
scftorture: Handle NULL argument passed to scf_add_to_free_list().

Dan reported that after the rework the newly introduced
scf_add_to_free_list() may get a NULL pointer passed. This replaced
kfree() which was fine with a NULL pointer but scf_add_to_free_list()
isn't.

Let scf_add_to_free_list() handle NULL pointer.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/2375aa2c-3248-4ffa-b9b0-f0a24c50f237@stanley.mountain
Fixes: 4788c861ad7e9 ("scftorture: Use a lock-less list to free memory.")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
1 file changed