mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-19 08:13:57 +00:00
If thread requested to not stop on non-boundary, then not only
stopping signals should obey, but also all forms of single-threading. Otherwise, thread might sleep interruptible while owning some resources, and single-threading thread could try to access them. An example is owning vnode lock while dumping core. Submitted by: Conrad Meyer Review: https://reviews.freebsd.org/D2612 Tested by: pho MFC after: 1 week
This commit is contained in:
parent
940be86497
commit
3077f938b4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=283320
|
@ -868,12 +868,9 @@ thread_suspend_check(int return_instead)
|
|||
return (ERESTART);
|
||||
|
||||
/*
|
||||
* Ignore suspend requests for stop signals if they
|
||||
* are deferred.
|
||||
* Ignore suspend requests if they are deferred.
|
||||
*/
|
||||
if ((P_SHOULDSTOP(p) == P_STOPPED_SIG ||
|
||||
(p->p_flag & P_TOTAL_STOP) != 0) &&
|
||||
(td->td_flags & TDF_SBDRY) != 0) {
|
||||
if ((td->td_flags & TDF_SBDRY) != 0) {
|
||||
KASSERT(return_instead,
|
||||
("TDF_SBDRY set for unsafe thread_suspend_check"));
|
||||
return (0);
|
||||
|
|
Loading…
Reference in a new issue