From cdea3bef22a5e1b28f8215651ce994e11d43ef71 Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Mon, 10 Mar 2014 08:52:30 +0000 Subject: [PATCH] Ignore USB keyboard driver calls from critical sections. Reported by: Oliver Pinter MFC after: 1 week --- sys/dev/usb/input/ukbd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c index 3f3de5188a5..2a8b2d014e5 100644 --- a/sys/dev/usb/input/ukbd.c +++ b/sys/dev/usb/input/ukbd.c @@ -1908,6 +1908,12 @@ ukbd_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) { int result; + /* + * XXX Check of someone is calling us from a critical section: + */ + if (curthread->td_critnest != 0) + return (EDEADLK); + /* * XXX KDGKBSTATE, KDSKBSTATE and KDSETLED can be called from any * context where printf(9) can be called, which among other things