Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sun Fix panic on sun3 when any key is typed when kbd...
details: https://anonhg.NetBSD.org/src/rev/dd4608954ba7
branches: trunk
changeset: 968512:dd4608954ba7
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sat Jan 18 21:08:42 2020 +0000
description:
Fix panic on sun3 when any key is typed when kbd is not console. PR/54873
Should be pulled up to netbsd-9.
diffstat:
sys/dev/sun/kbd.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (41 lines):
diff -r be731f85a7e3 -r dd4608954ba7 sys/dev/sun/kbd.c
--- a/sys/dev/sun/kbd.c Sat Jan 18 20:47:15 2020 +0000
+++ b/sys/dev/sun/kbd.c Sat Jan 18 21:08:42 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kbd.c,v 1.70 2019/11/10 21:16:37 chs Exp $ */
+/* $NetBSD: kbd.c,v 1.71 2020/01/18 21:08:42 tsutsui Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -47,7 +47,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.70 2019/11/10 21:16:37 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.71 2020/01/18 21:08:42 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -202,7 +202,7 @@
k->k_events.ev_io = l->l_proc;
/* stop pending autorepeat of console input */
- if (k->k_repeating) {
+ if (k->k_cc != NULL && k->k_repeating) {
k->k_repeating = 0;
callout_stop(&k->k_repeat_ch);
}
@@ -492,9 +492,11 @@
/*
* If /dev/kbd is not connected in event mode, or wskbd mode,
- * translate and send upstream (to console).
+ * and is attached as console, translate and send upstream
+ * (to console).
*/
- kbd_input_console(k, code);
+ if (k->k_cc != NULL)
+ kbd_input_console(k, code);
}
Home |
Main Index |
Thread Index |
Old Index