mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Only test return_instead if P_SINGLE_EXIT is set, otherwise a fork()
syscall can interrupt other thread's syscall in sleepq_catch_signals(). Current, all callers know thread_suspend_check may suspend thread itself, so we need't to check return_instead for normal suspension flags (no P_SINGLE_EXIT set). Tested by: deischen Reported by: Maarten L. Hekkelman <m.hekkelman@cmbi.kun.nl>
This commit is contained in:
parent
9b98b79683
commit
45a4bfa17d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=134498
@ -989,7 +989,7 @@ thread_suspend_check(int return_instead)
|
||||
if (p->p_singlethread == td)
|
||||
return (0); /* Exempt from stopping. */
|
||||
}
|
||||
if (return_instead)
|
||||
if ((p->p_flag & P_SINGLE_EXIT) && return_instead)
|
||||
return (1);
|
||||
|
||||
mtx_lock_spin(&sched_lock);
|
||||
|
Loading…
Reference in New Issue
Block a user