]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r313733:
authorbadger <badger@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 16 Mar 2017 01:41:36 +0000 (01:41 +0000)
committerbadger <badger@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 16 Mar 2017 01:41:36 +0000 (01:41 +0000)
commit7df7ddf034f106f821862413fd21ed8a01a874da
tree40be45887dec05a3e8b062f19d79e2424abeb182
parent06f8a0adcfe977070d325a81ec827215849427ff
MFC r313733:

sleepq_catch_signals: do thread suspension before signal check

Since locks are dropped when a thread suspends, it's possible for another
thread to deliver a signal to the suspended thread. If the thread awakens from
suspension without checking for signals, it may go to sleep despite having
a pending signal that should wake it up. Therefore the suspension check is
done first, so any signals sent while suspended will be caught in the
subsequent signal check.

Sponsored by: Dell EMC

git-svn-id: svn://svn.freebsd.org/base/stable/10@315345 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/kern/subr_sleepqueue.c