svn commit: r280531 - stable/9/sys/dev/usb/input

Hans Petter Selasky hselasky at FreeBSD.org
Wed Mar 25 10:37:19 UTC 2015


Author: hselasky
Date: Wed Mar 25 10:37:17 2015
New Revision: 280531
URL: https://svnweb.freebsd.org/changeset/base/280531

Log:
  MFC r279854:
  Lock softc before clearing bits.

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

Modified: stable/9/sys/dev/usb/input/uhid.c
==============================================================================
--- stable/9/sys/dev/usb/input/uhid.c	Wed Mar 25 10:36:37 2015	(r280530)
+++ stable/9/sys/dev/usb/input/uhid.c	Wed Mar 25 10:37:17 2015	(r280531)
@@ -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