diff options
author | John Baldwin <jhb@FreeBSD.org> | 2013-03-21 14:06:27 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2013-03-21 14:06:27 +0000 |
commit | d071a6fa33d2e172b562a8e6fd3da1b089d48dd3 (patch) | |
tree | b092b5e06cc6203f2835efa36b0136ddabdce1b8 /sys/kern/kern_thread.c | |
parent | c46262f8109e20617deddebd81374e3e6a219512 (diff) | |
download | src-test2-d071a6fa33d2e172b562a8e6fd3da1b089d48dd3.tar.gz src-test2-d071a6fa33d2e172b562a8e6fd3da1b089d48dd3.zip |
Notes
Diffstat (limited to 'sys/kern/kern_thread.c')
-rw-r--r-- | sys/kern/kern_thread.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 4f0266b668e7..5da4866d6387 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -795,6 +795,17 @@ thread_suspend_check(int 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. * Assumes that P_SINGLE_EXIT implies P_STOPPED_SINGLE. |