]> git.baikalelectronics.ru Git - kernel.git/commit
scftorture: Avoid NULL pointer exception on early exit
authorPaul E. McKenney <paulmck@kernel.org>
Sat, 10 Jul 2021 00:53:27 +0000 (17:53 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Tue, 27 Jul 2021 18:39:30 +0000 (11:39 -0700)
commited8a6e6bceb1404837bf6a1829e0223cd291437a
tree659518c2f70f26f70869ed082aaaf9f5128b4c05
parent58d018c0c6b7daaa45ad3e1df82901bddc8e0139
scftorture: Avoid NULL pointer exception on early exit

When scftorture finds an error in the module parameters controlling
the relative frequencies of smp_call_function*() variants, it takes an
early exit.  So early that it has not allocated memory to track the
kthreads running the test, which results in a segfault.  This commit
therefore checks for the existence of the memory before attempting
to stop the kthreads that would otherwise have been recorded in that
non-existent memory.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/scftorture.c