From aa2f29d03f17b672a326e6ea9d3c9dac9c32dc7a Mon Sep 17 00:00:00 2001 From: Martin Pieuchot Date: Wed, 8 Apr 2020 08:07:53 +0000 Subject: Make fifo_kqfilter() honor FREAD|FWRITE just like fifo_poll() does. Prevent generating events that do not correspond to how the fifo has been opened. ok visa@, millert@ --- sys/kern/vfs_vnops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/kern/vfs_vnops.c') diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 54fbebb00d8..fefbebf3cfd 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_vnops.c,v 1.113 2020/02/22 11:58:29 anton Exp $ */ +/* $OpenBSD: vfs_vnops.c,v 1.114 2020/04/08 08:07:51 mpi Exp $ */ /* $NetBSD: vfs_vnops.c,v 1.20 1996/02/04 02:18:41 christos Exp $ */ /* @@ -619,7 +619,7 @@ vn_closefile(struct file *fp, struct proc *p) int vn_kqfilter(struct file *fp, struct knote *kn) { - return (VOP_KQFILTER(fp->f_data, kn)); + return (VOP_KQFILTER(fp->f_data, fp->f_flag, kn)); } int -- cgit v1.2.3