The branch stable/13 has been updated by kib:

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

commit dd93a6270db30ca9ff07a108b0173368c8bf97e3
Author:     Konstantin Belousov <[email protected]>
AuthorDate: 2021-04-28 15:45:36 +0000
Commit:     Konstantin Belousov <[email protected]>
CommitDate: 2021-05-03 01:27:05 +0000

    O_PATH: disable kqfilter for fifos
    
    (cherry picked from commit 2082565798041ceb9fb77137f00ea6b0ff50fe5e)
---
 sys/kern/vfs_vnops.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index f715c9828d04..832c717a33b7 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -427,7 +427,10 @@ vn_open_vnode(struct vnode *vp, int fmode, struct ucred 
*cred,
                        return (error);
        }
        if ((fmode & O_PATH) != 0) {
-               error = VOP_ACCESS(vp, VREAD, cred, td);
+               if (vp->v_type == VFIFO)
+                       error = EPIPE;
+               else
+                       error = VOP_ACCESS(vp, VREAD, cred, td);
                if (error == 0)
                        fp->f_flag |= FKQALLOWED;
                return (0);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to