Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jun 2012 10:39:42 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r237773 - stable/9/sys/dev/adb
Message-ID:  <201206291039.q5TAdgbA040672@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Fri Jun 29 10:39:42 2012
New Revision: 237773
URL: http://svn.freebsd.org/changeset/base/237773

Log:
  MFC r237480
  
  Release the ADB keyboard mutex when handling the power button
  press/release.  Found by WITNESS.
  
  Approved by:	nwhitehorn (mentor)

Modified:
  stable/9/sys/dev/adb/adb_kbd.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/adb/adb_kbd.c
==============================================================================
--- stable/9/sys/dev/adb/adb_kbd.c	Fri Jun 29 10:31:26 2012	(r237772)
+++ stable/9/sys/dev/adb/adb_kbd.c	Fri Jun 29 10:39:42 2012	(r237773)
@@ -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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206291039.q5TAdgbA040672>