diff options
author | nicm <nicm@openbsd.org> | 2013-04-24 09:52:54 +0000 |
---|---|---|
committer | nicm <nicm@openbsd.org> | 2013-04-24 09:52:54 +0000 |
commit | be2adc8d83fea254ed38697f5d81723c72bf3e3b (patch) | |
tree | 84ba24044aaac306c6c41283dae5c0456e3cb684 /sys/sys/event.h | |
parent | When attaching disks, feed the disklabel's checksum to (diff) | |
download | wireguard-openbsd-be2adc8d83fea254ed38697f5d81723c72bf3e3b.tar.xz wireguard-openbsd-be2adc8d83fea254ed38697f5d81723c72bf3e3b.zip |
When a ucom(4) is removed, it frees the tty with ttyfree(). However if
anyone is waiting with kqueue their knotes may still have a reference to
the tty and later try to use it in the filt_tty* functions.
To avoid this, walk the knotes in ttyfree(), remove them from the tty's
list and invalidate them by setting kn_hook to NODEV. The filter
functions can then check for this and safely ignore the knotes.
ok tedu matthieu
Diffstat (limited to 'sys/sys/event.h')
-rw-r--r-- | sys/sys/event.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/sys/event.h b/sys/sys/event.h index fada3e779cb..96812ab59a2 100644 --- a/sys/sys/event.h +++ b/sys/sys/event.h @@ -1,4 +1,4 @@ -/* $OpenBSD: event.h,v 1.17 2012/06/08 05:22:49 guenther Exp $ */ +/* $OpenBSD: event.h,v 1.18 2013/04/24 09:52:54 nicm Exp $ */ /*- * Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org> @@ -167,6 +167,7 @@ struct knote { struct proc; extern void knote(struct klist *list, long hint); +extern void knote_activate(struct knote *); extern void knote_remove(struct proc *p, struct klist *list); extern void knote_fdclose(struct proc *p, int fd); extern void knote_processexit(struct process *); |