Another NFS SIGSTOP related fix: Ignore thread suspend requests due to
SIGSTOP if stop signals are currently deferred. This can occur if a process is stopped via SIGSTOP while a thread is running or runnable but before it has set TDF_SBDRY. Tested by: pho Reviewed by: kib MFC after: 1 week
This commit is contained in:
parent
c46262f810
commit
d071a6fa33
@ -794,6 +794,17 @@ thread_suspend_check(int return_instead)
|
||||
(p->p_flag & P_SINGLE_BOUNDARY) && return_instead)
|
||||
return (ERESTART);
|
||||
|
||||
/*
|
||||
* Ignore suspend requests for stop signals if they
|
||||
* are deferred.
|
||||
*/
|
||||
if (P_SHOULDSTOP(p) == P_STOPPED_SIG &&
|
||||
td->td_flags & TDF_SBDRY) {
|
||||
KASSERT(return_instead,
|
||||
("TDF_SBDRY set for unsafe thread_suspend_check"));
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* If the process is waiting for us to exit,
|
||||
* this thread should just suicide.
|
||||
|
Loading…
Reference in New Issue
Block a user