artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a5df31
)
Writes to the ps_flags field of struct process should be atomic.
author
rob
<rob@openbsd.org>
Thu, 17 Feb 2022 03:12:34 +0000
(
03:12
+0000)
committer
rob
<rob@openbsd.org>
Thu, 17 Feb 2022 03:12:34 +0000
(
03:12
+0000)
Ok deraadt@ guenther@
sys/kern/vfs_syscalls.c
patch
|
blob
|
history
diff --git
a/sys/kern/vfs_syscalls.c
b/sys/kern/vfs_syscalls.c
index
bfce966
..
31122a2
100644
(file)
--- a/
sys/kern/vfs_syscalls.c
+++ b/
sys/kern/vfs_syscalls.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: vfs_syscalls.c,v 1.35
5 2022/02/15 23:16:00
rob Exp $ */
+/* $OpenBSD: vfs_syscalls.c,v 1.35
6 2022/02/17 03:12:34
rob Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */
/*
@@
-829,7
+829,7
@@
sys_chroot(struct proc *p, void *v, register_t *retval)
vrele(old_cdir);
} else
fdp->fd_rdir = nd.ni_vp;
-
p->p_p->ps_flags |= PS_CHROOT
;
+
atomic_setbits_int(&p->p_p->ps_flags, PS_CHROOT)
;
return (0);
}