mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-19 06:44:31 +00:00
Lock proc lock before changing p_flag.
This commit is contained in:
parent
21e0492ab1
commit
661db6da35
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112078
|
@ -610,7 +610,9 @@ kse_create(struct thread *td, struct kse_create_args *uap)
|
|||
ncpus = virtual_cpu;
|
||||
|
||||
/* Easier to just set it than to test and set */
|
||||
PROC_LOCK(p);
|
||||
p->p_flag |= P_THREADED;
|
||||
PROC_UNLOCK(p);
|
||||
kg = td->td_ksegrp;
|
||||
if (uap->newgroup) {
|
||||
/* Have race condition but it is cheap */
|
||||
|
|
|
@ -610,7 +610,9 @@ kse_create(struct thread *td, struct kse_create_args *uap)
|
|||
ncpus = virtual_cpu;
|
||||
|
||||
/* Easier to just set it than to test and set */
|
||||
PROC_LOCK(p);
|
||||
p->p_flag |= P_THREADED;
|
||||
PROC_UNLOCK(p);
|
||||
kg = td->td_ksegrp;
|
||||
if (uap->newgroup) {
|
||||
/* Have race condition but it is cheap */
|
||||
|
|
Loading…
Reference in a new issue