]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Fix issig() to check signal_pending after dequeue SIGSTOP/SIGTSTP
authorJitendra Patidar <jitendra.patidar@nutanix.com>
Tue, 27 Aug 2024 00:36:49 +0000 (06:06 +0530)
committerGitHub <noreply@github.com>
Tue, 27 Aug 2024 00:36:49 +0000 (17:36 -0700)
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 <behlendorf1@llnl.gov>
Signed-off-by: Jitendra Patidar <jitendra.patidar@nutanix.com>
Closes #16464

module/os/linux/spl/spl-thread.c

index dbb8eefa7ec47a7aa1b74e31ab45a4f507a5d02f..2af766ac20490b627a708b2e904303d2843dce0a 100644 (file)
@@ -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);
        }