diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-10-31 06:40:18 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-10-31 06:40:18 +0000 |
commit | f3184ac14f03da17bde002ccff8abf43076b34bc (patch) | |
tree | 095aba03ec9c46097cdee71ffbe0a3cf6726ded1 /sys/dev | |
parent | 84fb3053dd046225edb7868a8dd17410070e5b8c (diff) |
Add missing KNOTE() calls after selwakeup(), until we decide if the KNOTE()
calls can go directly into selwakeup() safely
long discussion with nicm, murmers of consent from tedu and miod, noone
else seems to care of kqueue is busted as long as it makes their sockets
move data fast... pretty sad.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/com.c | 3 | ||||
-rw-r--r-- | sys/dev/ic/cy.c | 3 | ||||
-rw-r--r-- | sys/dev/ic/z8530tty.c | 3 | ||||
-rw-r--r-- | sys/dev/pci/bktr/bktr_core.c | 3 | ||||
-rw-r--r-- | sys/dev/pci/cz.c | 3 | ||||
-rw-r--r-- | sys/dev/sbus/magma.c | 3 | ||||
-rw-r--r-- | sys/dev/sbus/spif.c | 3 | ||||
-rw-r--r-- | sys/dev/systrace.c | 3 | ||||
-rw-r--r-- | sys/dev/usb/ucom.c | 3 | ||||
-rw-r--r-- | sys/dev/usb/ugen.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/uhid.c | 3 | ||||
-rw-r--r-- | sys/dev/usb/usb.c | 3 |
12 files changed, 25 insertions, 12 deletions
diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c index 7c1532b3014..a247d866226 100644 --- a/sys/dev/ic/com.c +++ b/sys/dev/ic/com.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com.c,v 1.132 2009/10/13 19:33:16 pirofti Exp $ */ +/* $OpenBSD: com.c,v 1.133 2009/10/31 06:40:16 deraadt Exp $ */ /* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */ /* @@ -902,6 +902,7 @@ comstart(struct tty *tp) if (tp->t_outq.c_cc == 0) goto stopped; selwakeup(&tp->t_wsel); + KNOTE(&tp->t_wsel.si_note, 0); } SET(tp->t_state, TS_BUSY); diff --git a/sys/dev/ic/cy.c b/sys/dev/ic/cy.c index cda20beff29..500019dc850 100644 --- a/sys/dev/ic/cy.c +++ b/sys/dev/ic/cy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cy.c,v 1.25 2005/11/21 18:16:39 millert Exp $ */ +/* $OpenBSD: cy.c,v 1.26 2009/10/31 06:40:17 deraadt Exp $ */ /* * Copyright (c) 1996 Timo Rossi. * All rights reserved. @@ -629,6 +629,7 @@ cystart(tp) } selwakeup(&tp->t_wsel); + KNOTE(&tp->t_wsel.si_note, 0); if (tp->t_outq.c_cc == 0) goto out; diff --git a/sys/dev/ic/z8530tty.c b/sys/dev/ic/z8530tty.c index 10ddebc1996..9a516f1e43c 100644 --- a/sys/dev/ic/z8530tty.c +++ b/sys/dev/ic/z8530tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: z8530tty.c,v 1.17 2008/01/18 21:36:43 kettenis Exp $ */ +/* $OpenBSD: z8530tty.c,v 1.18 2009/10/31 06:40:17 deraadt Exp $ */ /* $NetBSD: z8530tty.c,v 1.13 1996/10/16 20:42:14 gwr Exp $ */ /* @@ -606,6 +606,7 @@ zsstart(tp) wakeup((caddr_t)&tp->t_outq); } selwakeup(&tp->t_wsel); + KNOTE(&tp->t_wsel.si_note, 0); } nch = ndqb(&tp->t_outq, 0); /* XXX */ diff --git a/sys/dev/pci/bktr/bktr_core.c b/sys/dev/pci/bktr/bktr_core.c index fa412985c1f..a4cde5e1ea9 100644 --- a/sys/dev/pci/bktr/bktr_core.c +++ b/sys/dev/pci/bktr/bktr_core.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bktr_core.c,v 1.26 2007/11/26 09:28:34 martynas Exp $ */ +/* $OpenBSD: bktr_core.c,v 1.27 2009/10/31 06:40:17 deraadt Exp $ */ /* $FreeBSD: src/sys/dev/bktr/bktr_core.c,v 1.114 2000/10/31 13:09:56 roger Exp $ */ /* @@ -657,6 +657,7 @@ common_bktr_intr( void *arg ) if (bktr->vbi_select.si_selpid) { #endif selwakeup(&bktr->vbi_select); + KNOTE(&bktr->vbi_select.si_note, 0); } } diff --git a/sys/dev/pci/cz.c b/sys/dev/pci/cz.c index 6a057aa6c32..91b151f68fb 100644 --- a/sys/dev/pci/cz.c +++ b/sys/dev/pci/cz.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cz.c,v 1.11 2009/01/11 16:54:59 blambert Exp $ */ +/* $OpenBSD: cz.c,v 1.12 2009/10/31 06:40:17 deraadt Exp $ */ /* $NetBSD: cz.c,v 1.15 2001/01/20 19:10:36 thorpej Exp $ */ /*- @@ -1486,6 +1486,7 @@ czttystart(struct tty *tp) wakeup(&tp->t_outq); } selwakeup(&tp->t_wsel); + KNOTE(&tp->t_wsel.si_note, 0); if (tp->t_outq.c_cc == 0) goto out; } diff --git a/sys/dev/sbus/magma.c b/sys/dev/sbus/magma.c index 8d44f4254ea..f79c7f8413d 100644 --- a/sys/dev/sbus/magma.c +++ b/sys/dev/sbus/magma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: magma.c,v 1.17 2008/11/29 05:56:41 deraadt Exp $ */ +/* $OpenBSD: magma.c,v 1.18 2009/10/31 06:40:17 deraadt Exp $ */ /*- * Copyright (c) 1998 Iain Hibbert @@ -1123,6 +1123,7 @@ mtty_start(struct tty *tp) } selwakeup(&tp->t_wsel); + KNOTE(&tp->t_wsel.si_note, 0); } /* if something to send, start transmitting diff --git a/sys/dev/sbus/spif.c b/sys/dev/sbus/spif.c index 830180322ad..febec144e0c 100644 --- a/sys/dev/sbus/spif.c +++ b/sys/dev/sbus/spif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spif.c,v 1.13 2006/03/04 13:00:55 miod Exp $ */ +/* $OpenBSD: spif.c,v 1.14 2009/10/31 06:40:17 deraadt Exp $ */ /* * Copyright (c) 1999-2002 Jason L. Wright (jason@thought.net) @@ -746,6 +746,7 @@ stty_start(tp) wakeup(&tp->t_outq); } selwakeup(&tp->t_wsel); + KNOTE(&tp->t_wsel.si_note, 0); } if (tp->t_outq.c_cc) { sp->sp_txc = ndqb(&tp->t_outq, 0); diff --git a/sys/dev/systrace.c b/sys/dev/systrace.c index 2ad38420036..f3ede4462d1 100644 --- a/sys/dev/systrace.c +++ b/sys/dev/systrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: systrace.c,v 1.50 2009/07/09 22:29:55 thib Exp $ */ +/* $OpenBSD: systrace.c,v 1.51 2009/10/31 06:40:16 deraadt Exp $ */ /* * Copyright 2002 Niels Provos <provos@citi.umich.edu> * All rights reserved. @@ -609,6 +609,7 @@ systrace_wakeup(struct fsystrace *fst) { wakeup((caddr_t)fst); selwakeup(&fst->si); + KNOTE(&fst->si.si_note, 0); } struct proc * diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index 1de3fca03ec..a0e1b28c731 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ucom.c,v 1.43 2009/10/13 19:33:17 pirofti Exp $ */ +/* $OpenBSD: ucom.c,v 1.44 2009/10/31 06:40:17 deraadt Exp $ */ /* $NetBSD: ucom.c,v 1.49 2003/01/01 00:10:25 thorpej Exp $ */ /* @@ -949,6 +949,7 @@ ucomstart(struct tty *tp) wakeup(&tp->t_outq); } selwakeup(&tp->t_wsel); + KNOTE(&tp->t_wsel.si_note, 0); if (tp->t_outq.c_cc == 0) goto out; } diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c index c4998f7e2fd..c90c58dcc5a 100644 --- a/sys/dev/usb/ugen.c +++ b/sys/dev/usb/ugen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ugen.c,v 1.59 2009/10/13 19:33:17 pirofti Exp $ */ +/* $OpenBSD: ugen.c,v 1.60 2009/10/31 06:40:17 deraadt Exp $ */ /* $NetBSD: ugen.c,v 1.63 2002/11/26 18:49:48 christos Exp $ */ /* $FreeBSD: src/sys/dev/usb/ugen.c,v 1.26 1999/11/17 22:33:41 n_hibma Exp $ */ @@ -822,6 +822,7 @@ ugenintr(usbd_xfer_handle xfer, usbd_private_handle addr, usbd_status status) wakeup(sce); } selwakeup(&sce->rsel); + KNOTE(&sce->rsel.si_note, 0); } void @@ -881,6 +882,7 @@ ugen_isoc_rintr(usbd_xfer_handle xfer, usbd_private_handle addr, wakeup(sce); } selwakeup(&sce->rsel); + KNOTE(&sce->rsel.si_note, 0); } usbd_status diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index f9af66a7437..76e0dda1246 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhid.c,v 1.44 2009/10/13 19:33:19 pirofti Exp $ */ +/* $OpenBSD: uhid.c,v 1.45 2009/10/31 06:40:17 deraadt Exp $ */ /* $NetBSD: uhid.c,v 1.57 2003/03/11 16:44:00 augustss Exp $ */ /* @@ -234,6 +234,7 @@ uhid_intr(struct uhidev *addr, void *data, u_int len) wakeup(&sc->sc_q); } selwakeup(&sc->sc_rsel); + KNOTE(&sc->sc_rsel.si_note, 0); if (sc->sc_async != NULL) { DPRINTFN(3, ("uhid_intr: sending SIGIO %p\n", sc->sc_async)); psignal(sc->sc_async, SIGIO); diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c index d64559e56be..222aa200cd5 100644 --- a/sys/dev/usb/usb.c +++ b/sys/dev/usb/usb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usb.c,v 1.59 2009/10/13 19:33:19 pirofti Exp $ */ +/* $OpenBSD: usb.c,v 1.60 2009/10/31 06:40:17 deraadt Exp $ */ /* $NetBSD: usb.c,v 1.77 2003/01/01 00:10:26 thorpej Exp $ */ /* @@ -770,6 +770,7 @@ usb_add_event(int type, struct usb_event *uep) SIMPLEQ_INSERT_TAIL(&usb_events, ueq, next); wakeup(&usb_events); selwakeup(&usb_selevent); + KNOTE(&usb_selevent.si_note, 0); if (usb_async_proc != NULL) psignal(usb_async_proc, SIGIO); splx(s); |