Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/sys/dev/sun Pull up following revision(s) (requested by t...



details:   https://anonhg.NetBSD.org/src/rev/c7589d8e9523
branches:  netbsd-9
changeset: 1001398:c7589d8e9523
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Jan 21 15:44:24 2020 +0000

description:
Pull up following revision(s) (requested by tsutsui in ticket #637):

        sys/dev/sun/kbd.c: revision 1.71

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 07413041a951 -r c7589d8e9523 sys/dev/sun/kbd.c
--- a/sys/dev/sun/kbd.c Tue Jan 21 15:41:43 2020 +0000
+++ b/sys/dev/sun/kbd.c Tue Jan 21 15:44:24 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kbd.c,v 1.69 2018/02/08 10:52:05 mrg Exp $     */
+/*     $NetBSD: kbd.c,v 1.69.10.1 2020/01/21 15:44:24 martin Exp $     */
 
 /*
  * Copyright (c) 1992, 1993
@@ -47,7 +47,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.69 2018/02/08 10:52:05 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.69.10.1 2020/01/21 15:44:24 martin 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