diff options
author | Rob Pierce <rob@cvs.openbsd.org> | 2022-02-17 03:12:35 +0000 |
---|---|---|
committer | Rob Pierce <rob@cvs.openbsd.org> | 2022-02-17 03:12:35 +0000 |
commit | 5bfda0d1fe6d10f170ccb1bc197e8dcdc83fc65c (patch) | |
tree | 2cad5e72e4e9369b7bf7bca8af3dc0fcce770621 | |
parent | 54ce16c02aabe8d4e83a7d15497b4f54cc896503 (diff) |
Writes to the ps_flags field of struct process should be atomic.
Ok deraadt@ guenther@
-rw-r--r-- | sys/kern/vfs_syscalls.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index bfce966733e..31122a286f4 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_syscalls.c,v 1.355 2022/02/15 23:16:00 rob Exp $ */ +/* $OpenBSD: vfs_syscalls.c,v 1.356 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); } |