svn commit: r280534 - stable/8/sys/dev/usb/input

Hans Petter Selasky hselasky at FreeBSD.org
Wed Mar 25 10:39:00 UTC 2015


Author: hselasky
Date: Wed Mar 25 10:38:59 2015
New Revision: 280534
URL: https://svnweb.freebsd.org/changeset/base/280534

Log:
  MFC r279854:
  Lock softc before clearing bits.

Modified:
  stable/8/sys/dev/usb/input/uhid.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)
  stable/8/sys/dev/usb/   (props changed)

Modified: stable/8/sys/dev/usb/input/uhid.c
==============================================================================
--- stable/8/sys/dev/usb/input/uhid.c	Wed Mar 25 10:38:22 2015	(r280533)
+++ stable/8/sys/dev/usb/input/uhid.c	Wed Mar 25 10:38:59 2015	(r280534)
@@ -518,7 +518,9 @@ uhid_open(struct usb_fifo *fifo, int ffl
 	 */
 	if (fflags & FREAD) {
 		/* reset flags */
+		mtx_lock(&sc->sc_mtx);
 		sc->sc_flags &= ~UHID_FLAG_IMMED;
+		mtx_unlock(&sc->sc_mtx);
 
 		if (usb_fifo_alloc_buffer(fifo,
 		    sc->sc_isize + 1, UHID_FRAME_NUM)) {


More information about the svn-src-all mailing list