git: a0fb45e3de55 - stable/15 - kern_umtx.c: remove dead code
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 23 May 2026 07:13:45 UTC
The branch stable/15 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=a0fb45e3de55f3d0c08f463946938867ce608e98
commit a0fb45e3de55f3d0c08f463946938867ce608e98
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-05-20 00:49:09 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-05-23 06:56:13 +0000
kern_umtx.c: remove dead code
(cherry picked from commit d9c31658df8492a5666e799c2b267c425cb8f468)
---
sys/kern/kern_umtx.c | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c
index 905ebd4f98ac..d9798fb2adb6 100644
--- a/sys/kern/kern_umtx.c
+++ b/sys/kern/kern_umtx.c
@@ -4624,17 +4624,12 @@ umtx_shm(struct thread *td, void *addr, u_int flags)
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,