diff options
| author | Alfred Perlstein <alfred@FreeBSD.org> | 2004-07-15 03:49:52 +0000 |
|---|---|---|
| committer | Alfred Perlstein <alfred@FreeBSD.org> | 2004-07-15 03:49:52 +0000 |
| commit | a88295bb83537d3a8f9f7144823b7fa1e963d764 (patch) | |
| tree | 13186d1dcf5679cf0fe5826b981cc91095bab4bd | |
| parent | a3d4136ade72506e1eac453dfe5e7eef13ff908f (diff) | |
Notes
| -rw-r--r-- | sys/kern/kern_event.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 4b9a7513f855..29491d7527be 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); } |
