Page MenuHomeFreeBSD

D57122.diff
No OneTemporary

D57122.diff

diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c
--- a/sys/kern/kern_umtx.c
+++ b/sys/kern/kern_umtx.c
@@ -4624,17 +4624,12 @@
if ((flags & UMTX_SHM_DESTROY) != 0) {
umtx_shm_unref_reg(reg, true);
} else {
-#if 0
-#ifdef MAC
- error = mac_posixshm_check_open(td->td_ucred,
- reg->ushm_obj, FFLAGS(O_RDWR));
- if (error == 0)
-#endif
- error = shm_access(reg->ushm_obj, td->td_ucred,
- FFLAGS(O_RDWR));
- if (error == 0)
-#endif
- error = falloc_caps(td, &fp, &fd, O_CLOEXEC, NULL);
+ /*
+ * The current vmspace has the mapping, so it can be
+ * converted into shm filedescriptor for current
+ * thread.
+ */
+ error = falloc_caps(td, &fp, &fd, O_CLOEXEC, NULL);
if (error == 0) {
shm_hold(reg->ushm_obj);
finit(fp, FFLAGS(O_RDWR), DTYPE_SHM, reg->ushm_obj,

File Metadata

Mime Type
text/plain
Expires
Wed, May 27, 11:24 PM (11 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33366499
Default Alt Text
D57122.diff (812 B)

Event Timeline