summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authordrochner <drochner@NetBSD.org>1999-03-27 11:22:23 +0000
committerdrochner <drochner@NetBSD.org>1999-03-27 11:22:23 +0000
commit1663f7072b5ce51cde059577266034d2dfa67d81 (patch)
tree8def1f95f267076a2ae16e7dbe17aec0249edf31 /sys/dev
parent257beb4e1991146de4eddca1474c2cac98869044 (diff)
remove a diagnostic panic in the keyboard autorepeat timeout() handler.
There is a rece condition which might trigger this but is harmless otherwise. Leave the handler silently instead.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/wscons/wskbd.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/dev/wscons/wskbd.c b/sys/dev/wscons/wskbd.c
index 84026f6f7ed..38fda5a8a54 100644
--- a/sys/dev/wscons/wskbd.c
+++ b/sys/dev/wscons/wskbd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wskbd.c,v 1.19 1999/01/26 17:08:37 drochner Exp $ */
+/* $NetBSD: wskbd.c,v 1.20 1999/03/27 11:22:23 drochner Exp $ */
/*
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
@@ -36,7 +36,7 @@
static const char _copyright[] __attribute__ ((unused)) =
"Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.";
static const char _rcsid[] __attribute__ ((unused)) =
- "$NetBSD: wskbd.c,v 1.19 1999/01/26 17:08:37 drochner Exp $";
+ "$NetBSD: wskbd.c,v 1.20 1999/03/27 11:22:23 drochner Exp $";
/*
* Copyright (c) 1992, 1993
@@ -352,7 +352,14 @@ wskbd_repeat(v)
struct wskbd_softc *sc = (struct wskbd_softc *)v;
int s = spltty();
- KASSERT(sc->sc_repeating);
+ if (!sc->sc_repeating) {
+ /*
+ * race condition: a "key up" event came in when wskbd_repeat()
+ * was already called but not yet spltty()'d
+ */
+ splx(s);
+ return;
+ }
if (sc->sc_displaydv != NULL)
wsdisplay_kbdinput(sc->sc_displaydv, sc->sc_repeatsym);
timeout(wskbd_repeat, sc,