From 73866cf3468f59e89baba31b93d8fdf503b10b19 Mon Sep 17 00:00:00 2001 From: Jitendra Patidar Date: Tue, 27 Aug 2024 06:06:49 +0530 Subject: [PATCH] Fix issig() to check signal_pending after dequeue SIGSTOP/SIGTSTP When process got SIGSTOP/SIGTSTP, issig() dequeue them and return 0. But process could still have another signal pending after dequeue. So, after dequeue, check and return 1, if signal_pending. Reviewed-by: Brian Behlendorf Signed-off-by: Jitendra Patidar Closes #16464 --- module/os/linux/spl/spl-thread.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/module/os/linux/spl/spl-thread.c b/module/os/linux/spl/spl-thread.c index dbb8eefa7..2af766ac2 100644 --- a/module/os/linux/spl/spl-thread.c +++ b/module/os/linux/spl/spl-thread.c @@ -186,6 +186,13 @@ issig(void) schedule(); #endif + /* + * Dequeued SIGSTOP/SIGTSTP. + * Check if process has other singal pending. + */ + if (signal_pending(current)) + return (1); + return (0); }