svn commit: r237480 - head/sys/dev/adb
Justin Hibbits
jhibbits at FreeBSD.org
Sat Jun 23 13:52:45 UTC 2012
Author: jhibbits
Date: Sat Jun 23 13:52:44 2012
New Revision: 237480
URL: http://svn.freebsd.org/changeset/base/237480
Log:
Release the ADB keyboard mutex when handling the power button
press/release. Found by WITNESS.
Approved by: nwhitehorn (mentor)
MFC after: 3 days
Modified:
head/sys/dev/adb/adb_kbd.c
Modified: head/sys/dev/adb/adb_kbd.c
==============================================================================
--- head/sys/dev/adb/adb_kbd.c Sat Jun 23 12:40:24 2012 (r237479)
+++ head/sys/dev/adb/adb_kbd.c Sat Jun 23 13:52:44 2012 (r237480)
@@ -426,8 +426,10 @@ adb_kbd_receive_packet(device_t dev, u_c
/* 0x7f is always the power button */
if (data[0] == 0x7f && devctl_process_running()) {
devctl_notify("PMU", "Button", "pressed", NULL);
+ mtx_unlock(&sc->sc_mutex);
return (0);
} else if (data[0] == 0xff) {
+ mtx_unlock(&sc->sc_mutex);
return (0); /* Ignore power button release. */
}
if ((data[0] & 0x7f) == 57 && sc->buffers < 7) {
More information about the svn-src-head
mailing list