]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sigfastblock: fix delivery of the pending signals in single-threaded processes.
authorKonstantin Belousov <kib@FreeBSD.org>
Mon, 11 May 2020 22:38:32 +0000 (22:38 +0000)
committerKonstantin Belousov <kib@FreeBSD.org>
Mon, 11 May 2020 22:38:32 +0000 (22:38 +0000)
commitfb3c434ba2ef9fe6a3ac531ae710e586568a80c7
treef3de2165657be4a3fb755e3568e6aa4cfc92c41f
parentf88ecf821ee8098091328601d2968715582d3ff6
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