summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2004-07-15 03:49:52 +0000
committeralfred <alfred@FreeBSD.org>2004-07-15 03:49:52 +0000
commitd81ea8a275a4bb64f0080e0e7a7d8a7517528afd (patch)
tree13186d1dcf5679cf0fe5826b981cc91095bab4bd
parentaa10381f8a72d8b38ae2e8b0a7a291a2c7956c7d (diff)
downloadFreeBSD-src-d81ea8a275a4bb64f0080e0e7a7d8a7517528afd.zip
FreeBSD-src-d81ea8a275a4bb64f0080e0e7a7d8a7517528afd.tar.gz
Disable SIGIO for now, leave a comment as to why it's busted and hard
to fix.
-rw-r--r--sys/kern/kern_event.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c
index 4b9a751..29491d7 100644
--- a/sys/kern/kern_event.c
+++ b/sys/kern/kern_event.c
@@ -817,6 +817,25 @@ static int
kqueue_ioctl(struct file *fp, u_long cmd, void *data,
struct ucred *active_cred, struct thread *td)
{
+ /*
+ * Enabling sigio causes two major problems:
+ * 1) infinite recursion:
+ * Synopsys: kevent is being used to track signals and have FIOASYNC
+ * set. On receipt of a signal this will cause a kqueue to recurse
+ * into itself over and over. Sending the sigio causes the kqueue
+ * to become ready, which in turn posts sigio again, forever.
+ * Solution: this can be solved by setting a flag in the kqueue that
+ * we have a SIGIO in progress.
+ * 2) locking problems:
+ * Synopsys: Kqueue is a leaf subsystem, but adding signalling puts
+ * us above the proc and pgrp locks.
+ * Solution: Post a signal using an async mechanism, being sure to
+ * record a generation count in the delivery so that we do not deliver
+ * a signal to the wrong process.
+ *
+ * Note, these two mechanisms are somewhat mutually exclusive!
+ */
+#if 0
struct kqueue *kq;
kq = fp->f_data;
@@ -836,6 +855,7 @@ kqueue_ioctl(struct file *fp, u_long cmd, void *data,
*(int *)data = fgetown(&kq->kq_sigio);
return (0);
}
+#endif
return (ENOTTY);
}
OpenPOWER on IntegriCloud