summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlexander Yurchenko <grange@cvs.openbsd.org>2004-11-29 17:05:07 +0000
committerAlexander Yurchenko <grange@cvs.openbsd.org>2004-11-29 17:05:07 +0000
commitfb632683a18d1b7eb7185cb786fb306b69e3862b (patch)
tree3264aa855e14514afaa4f7a045b39a2c2742a84d /sys
parente8e707bd754b6d2d69f1c9aa28b322e022cf23d4 (diff)
Don't use seltrue() in poll ops since it requires v_rdev dereferencing
which is not possible here. Problem found and fixed by form@. ok millert@ fgsch@ pedro@
Diffstat (limited to 'sys')
-rw-r--r--sys/isofs/cd9660/cd9660_vnops.c4
-rw-r--r--sys/kern/spec_vnops.c5
-rw-r--r--sys/miscfs/specfs/spec_vnops.c5
-rw-r--r--sys/msdosfs/msdosfs_vnops.c4
4 files changed, 10 insertions, 8 deletions
diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c
index 173b0375383..3d6db24113d 100644
--- a/sys/isofs/cd9660/cd9660_vnops.c
+++ b/sys/isofs/cd9660/cd9660_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd9660_vnops.c,v 1.31 2004/05/17 05:04:17 brad Exp $ */
+/* $OpenBSD: cd9660_vnops.c,v 1.32 2004/11/29 17:05:05 grange Exp $ */
/* $NetBSD: cd9660_vnops.c,v 1.42 1997/10/16 23:56:57 christos Exp $ */
/*-
@@ -421,7 +421,7 @@ cd9660_poll(v)
/*
* We should really check to see if I/O is possible.
*/
- return (seltrue(ap->a_vp->v_rdev, ap->a_events, ap->a_p));
+ return (ap->a_events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM));
}
/*
diff --git a/sys/kern/spec_vnops.c b/sys/kern/spec_vnops.c
index c3e675b5905..91861a87d57 100644
--- a/sys/kern/spec_vnops.c
+++ b/sys/kern/spec_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spec_vnops.c,v 1.27 2003/09/23 16:51:13 millert Exp $ */
+/* $OpenBSD: spec_vnops.c,v 1.28 2004/11/29 17:05:05 grange Exp $ */
/* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */
/*
@@ -464,7 +464,8 @@ spec_poll(v)
switch (ap->a_vp->v_type) {
default:
- return (seltrue(ap->a_vp->v_rdev, ap->a_events, ap->a_p));
+ return (ap->a_events &
+ (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM));
case VCHR:
dev = ap->a_vp->v_rdev;
diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c
index c3e675b5905..91861a87d57 100644
--- a/sys/miscfs/specfs/spec_vnops.c
+++ b/sys/miscfs/specfs/spec_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spec_vnops.c,v 1.27 2003/09/23 16:51:13 millert Exp $ */
+/* $OpenBSD: spec_vnops.c,v 1.28 2004/11/29 17:05:05 grange Exp $ */
/* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */
/*
@@ -464,7 +464,8 @@ spec_poll(v)
switch (ap->a_vp->v_type) {
default:
- return (seltrue(ap->a_vp->v_rdev, ap->a_events, ap->a_p));
+ return (ap->a_events &
+ (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM));
case VCHR:
dev = ap->a_vp->v_rdev;
diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c
index ad48c064ba8..4670f3ded45 100644
--- a/sys/msdosfs/msdosfs_vnops.c
+++ b/sys/msdosfs/msdosfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_vnops.c,v 1.47 2004/09/18 22:01:18 tedu Exp $ */
+/* $OpenBSD: msdosfs_vnops.c,v 1.48 2004/11/29 17:05:06 grange Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.63 1997/10/17 11:24:19 ws Exp $ */
/*-
@@ -717,7 +717,7 @@ msdosfs_poll(v)
struct proc *a_p;
} */ *ap = v;
- return (seltrue(ap->a_vp->v_rdev, ap->a_events, ap->a_p));
+ return (ap->a_events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM));
}
/*