diff options
author | hselasky <hselasky@FreeBSD.org> | 2014-03-17 06:38:40 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2014-03-17 06:38:40 +0000 |
commit | 7024a257ca035c8d95327243949a5845d38a30d0 (patch) | |
tree | c76f867f25904f5a6336fc5b4a6eba920b34d3a6 | |
parent | fedd0354840e4cdb1e121076e56896edd30432b0 (diff) | |
download | FreeBSD-src-7024a257ca035c8d95327243949a5845d38a30d0.zip FreeBSD-src-7024a257ca035c8d95327243949a5845d38a30d0.tar.gz |
MFC r262972:
Ignore USB keyboard driver calls from critical sections.
-rw-r--r-- | sys/dev/usb/input/ukbd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c index 3f3de51..2a8b2d0 100644 --- a/sys/dev/usb/input/ukbd.c +++ b/sys/dev/usb/input/ukbd.c @@ -1909,6 +1909,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 * includes interrupt filters and threads with any kinds of locks |