]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Let ptracestop() suspend threads sleeping in an SBDRY section.
authormarkj <markj@FreeBSD.org>
Thu, 11 May 2017 17:03:45 +0000 (17:03 +0000)
committermarkj <markj@FreeBSD.org>
Thu, 11 May 2017 17:03:45 +0000 (17:03 +0000)
commit8ff278d79180b97e4d13fb2866255508ea9487bc
tree8309df71ded31cf308ec018ef09ff21c9943f542
parentf5b2455b1a7c8dbce514f4163dd3181639d88938
Let ptracestop() suspend threads sleeping in an SBDRY section.

When a thread enters ptracestop(), for example because it had received
SIGSTOP from ptrace(PT_ATTACH), it attempts to suspend other threads in
the same process. In the case of a thread sleeping interruptibly in an
SBDRY section, sig_suspend_threads() must wake the thread and allow it to
reach the user-mode boundary. However, sig_suspend_threads() would
erroneously avoid waking up such threads, resulting in an apparent hang.

Reviewed by: kib
Tested by: pho
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
sys/kern/kern_sig.c