config: fix dequeue_signal check for kernels <4.20
commit21cba06befe98abe99c07b5827ca364836bcd17d
authorRob Norris <robn@despairlabs.com>
Mon, 21 Oct 2024 02:50:13 +0000 (21 13:50 +1100)
committerGitHub <noreply@github.com>
Mon, 21 Oct 2024 02:50:13 +0000 (20 19:50 -0700)
tree9bc8ff3fb1c5bd1d88caf7e5c073fd93c80ba04d
parentb2f6de7b58f81a4894ba26d87865a15e6115a1c2
config: fix dequeue_signal check for kernels <4.20

Before 4.20, kernel_siginfo_t was just called siginfo_t. This was
causing the kthread_dequeue_signal_3arg_task check, which uses
kernel_siginfo_t, to fail on older kernels.

In d6b8c17f1, we started checking for the "new" three-arg
dequeue_signal() by testing for the "old" version. Because that test is
explicitly using kernel_siginfo_t, it would fail, leading to the build
trying to use the new three-arg version, which would then not compile.

This commit fixes that by avoiding checking for the old 3-arg
dequeue_signal entirely. Instead, we check for the new one, as well as
the 4-arg form, and we use the old form as a fallback. This way, we
never have to test for it explicitly, and once we're building
HAVE_SIGINFO will make sure we get the right kernel_siginfo_t for it, so
everything works out nice.

Original-patch-by: Finix <yancw@info2soft.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes #16666
config/kernel-kthread.m4
module/os/linux/spl/spl-thread.c