]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix signal delivery might be on sigfastblock clearing.
authorkib <kib@FreeBSD.org>
Tue, 10 Mar 2020 20:25:03 +0000 (20:25 +0000)
committerkib <kib@FreeBSD.org>
Tue, 10 Mar 2020 20:25:03 +0000 (20:25 +0000)
commit7024c3cc7928707a42ba3ef1bed2726cf15f0909
tree856a5da049e6566bf7c0cb84d9d2fb288d966509
parent762b17815246d2da6352ad8ba1ecc98ed2049f1b
Fix signal delivery might be on sigfastblock clearing.

When clearing sigfastblock, either by sigfastblock(UNSETPTR) call or
implicitly on execve(2), kernel must check for pending signals and
reschedule them if needed.

E.g. on execve, all other threads are terminated, and current thread
fast block pointer is cleaned.  If any signal was left pending, it can
now be delivered to the current thread, and we should prepare for
ast() on return to userspace to notice the signals.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
sys/kern/kern_sig.c