Use READ_ONCE() when saving pr->ps_pledge to a local variable
authorjca <jca@openbsd.org>
Wed, 29 Jun 2022 12:01:22 +0000 (12:01 +0000)
committerjca <jca@openbsd.org>
Wed, 29 Jun 2022 12:01:22 +0000 (12:01 +0000)
commitbeabbbc9bf24be041db37f97b7f6d99f5c9a101d
tree8f76af65b68aacf820d4565f312243d61285a63f
parentda1f5ba3f3f9ea020d49384b48e1a7d29f57eeb6
Use READ_ONCE() when saving pr->ps_pledge to a local variable

This prevents the compiler from reloading a possibly different value
from memory.  Even if it doesn't matter in this code it's just better
practice.  Discussed with kettenis@ and deraadt@, ok deraadt@
sys/kern/kern_pledge.c