Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Apr 2008 20:01:15 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 139836 for review
Message-ID:  <200804112001.m3BK1F96063173@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=139836

Change 139836 by hselasky@hselasky_laptop001 on 2008/04/11 20:00:50

	
	Bugfix: We need to lock the global USB mutex
	when setting the configuration and alternate
	setting until further.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/ugen.c#40 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb/ugen.c#40 (text+ko) ====

@@ -1719,7 +1719,9 @@
 			error = EPERM;
 			break;
 		}
+		mtx_lock(&usb_global_lock);
 		error = ugen_set_config(sc, *(int *)addr);
+		mtx_unlock(&usb_global_lock);
 		if (error) {
 			break;
 		}
@@ -1740,7 +1742,9 @@
 			error = EPERM;
 			break;
 		}
+		mtx_lock(&usb_global_lock);
 		error = ugen_set_interface(sc, ai->uai_interface_index, ai->uai_alt_no);
+		mtx_unlock(&usb_global_lock);
 		if (error) {
 			break;
 		}



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