Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145912819
D26242.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1006 B
Referenced Files
None
Subscribers
None
D26242.id.diff
View Options
Index: head/sys/kern/uipc_shm.c
===================================================================
--- head/sys/kern/uipc_shm.c
+++ head/sys/kern/uipc_shm.c
@@ -833,6 +833,7 @@
}
shmfd = shm_alloc(td->td_ucred, cmode);
shmfd->shm_seals = initial_seals;
+ shmfd->shm_flags = shmflags;
} else {
error = shm_copyin_path(td, userpath, &path);
if (error != 0) {
@@ -855,6 +856,7 @@
#endif
shmfd = shm_alloc(td->td_ucred, cmode);
shmfd->shm_seals = initial_seals;
+ shmfd->shm_flags = shmflags;
shm_insert(path, fnv, shmfd);
#ifdef MAC
}
@@ -898,6 +900,8 @@
else if ((flags & (O_CREAT | O_EXCL)) ==
(O_CREAT | O_EXCL))
error = EEXIST;
+ else if (shmflags != 0 && shmflags != shmfd->shm_flags)
+ error = EINVAL;
else {
#ifdef MAC
error = mac_posixshm_check_open(td->td_ucred,
@@ -947,7 +951,6 @@
}
}
- shmfd->shm_flags = shmflags;
finit(fp, FFLAGS(flags & O_ACCMODE), DTYPE_SHM, shmfd, &shm_ops);
td->td_retval[0] = fd;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Feb 27, 2:44 AM (21 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29011234
Default Alt Text
D26242.id.diff (1006 B)
Attached To
Mode
D26242: posixshm: fix setting of shm_flags
Attached
Detach File
Event Timeline
Log In to Comment