mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
tests/sys/kern/procdesc.c: mark grandchild var in pdopenpid_capmode() as volatile
The variable is written in the child process which shares the address
space with the parent. The data flow must not be optimized by a compiler.
Reviewed by: markj
Fixes: ddf62c83fc ("sys/tests/kern/pdopenpid: pdopenpid(2) is allowed in cap mode")
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D59282
This commit is contained in:
1 parent
326ab530dc
commit
b3734c1386
1 file changed
+2
-1
@@ -372,7 +372,8 @@ ATF_TC_BODY(pdopenpid_child, tc)
|
||||
ATF_TC_WITHOUT_HEAD(pdopenpid_capmode);
|
||||
ATF_TC_BODY(pdopenpid_capmode, tc)
|
||||
{
|
||||
pid_t child, grandchild;
|
||||
pid_t child;
|
||||
volatile pid_t grandchild;
|
||||
|
||||
ATF_REQUIRE_FEATURE("security_capability_mode");
|
||||
|
||||
|
||||
Reference in new issue
Block a user