diff options
author | emax <emax@FreeBSD.org> | 2008-09-22 22:08:43 +0000 |
---|---|---|
committer | emax <emax@FreeBSD.org> | 2008-09-22 22:08:43 +0000 |
commit | 2e8cb2cac5fe9c79a114a56dab04edb0851bd8ce (patch) | |
tree | 80ec5a5122133db34fb25c2cd246aa25f2931229 /sys/dev | |
parent | 095f0c08e037f11dc6923a971ca0342e1d468023 (diff) | |
download | FreeBSD-src-2e8cb2cac5fe9c79a114a56dab04edb0851bd8ce.zip FreeBSD-src-2e8cb2cac5fe9c79a114a56dab04edb0851bd8ce.tar.gz |
Use Giant for kbdmux(4) locking. This is to workaround the problem
where interrupt handlers may race with kbdmux(4) in polling mode.
PR: kern/127446
Reported by: Eygene Ryabinkin rea-fbsd at codelabs dot ru
Tested by: Eygene Ryabinkin rea-fbsd at codelabs dot ru
MFC after: 1 week
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/kbdmux/kbdmux.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/kbdmux/kbdmux.c b/sys/dev/kbdmux/kbdmux.c index 3ece059..a979def 100644 --- a/sys/dev/kbdmux/kbdmux.c +++ b/sys/dev/kbdmux/kbdmux.c @@ -104,10 +104,10 @@ MALLOC_DEFINE(M_KBDMUX, KEYBOARD_NAME, "Keyboard multiplexor"); #define KBDMUX_LOCK_DESTROY(s) -#define KBDMUX_LOCK(s) - -#define KBDMUX_UNLOCK(s) - +#define KBDMUX_LOCK(s) \ + mtx_lock(&Giant) +#define KBDMUX_UNLOCK(s) \ + mtx_unlock(&Giant) #define KBDMUX_LOCK_ASSERT(s, w) #define KBDMUX_SLEEP(s, f, d, t) \ |