]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sigfastblock: fix delivery of the pending signals in single-threaded processes.
authorkib <kib@FreeBSD.org>
Mon, 11 May 2020 22:38:32 +0000 (22:38 +0000)
committerkib <kib@FreeBSD.org>
Mon, 11 May 2020 22:38:32 +0000 (22:38 +0000)
commit8349626b773b6ce87699ab7eabf03f385bfdef2e
treef3de2165657be4a3fb755e3568e6aa4cfc92c41f
parentcd1bab59c41ca32965965073a605030fe6a3f353
sigfastblock: fix delivery of the pending signals in single-threaded processes.

If single-threaded process receives a signal during critical section
established by sigfastblock(2) word, unblock did not caused signal
delivery because sigfastblock(SIGFASTBLOCK_UNBLOCK) failed to request
ast handling of the pending signals.

Set TDF_ASTPENDING | TDF_NEEDSIGCHK on unblock or when kernel forces
end of sigfastblock critical section, to cause syscall exit to recheck
and deliver any signal pending.

Reported by: corydoras@ridiculousfish.com
PR: 246385
Sponsored by: The FreeBSD Foundation
sys/kern/kern_sig.c