git: dbe24395879d - stable/14 - timefd: Correct the required rights for timerfd_gettime()

Mark Johnston <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src,gmane.os.freebsd.devel.stable.scm
Message-ID <[email protected]>
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=dbe24395879d68feb54d2866b19ba5ebd1542985

commit dbe24395879d68feb54d2866b19ba5ebd1542985
Author:     Mark Johnston <[email protected]>
AuthorDate: 2026-07-08 17:12:21 +0000
Commit:     Mark Johnston <[email protected]>
CommitDate: 2026-07-27 14:05:07 +0000

    timefd: Correct the required rights for timerfd_gettime()
    
    Reviewed by:    jfree
    MFC after:      1 week
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D58084
    
    (cherry picked from commit de6193cf7d2c0c31e5ccafd098275a629a5ea49e)
---
 sys/kern/sys_timerfd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/sys_timerfd.c b/sys/kern/sys_timerfd.c
index 22e6a30faa21..412a000c22d6 100644
--- a/sys/kern/sys_timerfd.c
+++ b/sys/kern/sys_timerfd.c
@@ -496,7 +496,7 @@ kern_timerfd_gettime(struct thread *td, int fd, struct itimerspec *curr_value)
 	struct timerfd *tfd;
 	int error;
 
-	error = fget(td, fd, &cap_write_rights, &fp);
+	error = fget(td, fd, &cap_read_rights, &fp);
 	if (error != 0)
 		return (error);
 	if (fp->f_type != DTYPE_TIMERFD) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.