Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Oct 2008 14:48:25 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 151662 for review
Message-ID:  <200810211448.m9LEmPgB016261@repoman.freebsd.org>

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

Change 151662 by hselasky@hselasky_laptop001 on 2008/10/21 14:47:25

	
	Fix witness complaints.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb2/core/usb2_device.c#27 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb2/core/usb2_device.c#27 (text+ko) ====

@@ -1303,15 +1303,20 @@
 		    "No free USB device index for new device!\n");
 		return (NULL);
 	}
+	if (depth > 0x10) {
+		device_printf(bus->bdev,
+		    "Invalid device depth!\n");
+		return (NULL);
+	}
 	udev = malloc(sizeof(*udev), M_USB, M_WAITOK | M_ZERO);
 	if (udev == NULL) {
 		return (NULL);
 	}
 	/* initialise our SX-lock */
-	sx_init(udev->default_sx, "USB device SX lock");
+	sx_init(udev->default_sx, "0123456789ABCDEF - USB device SX lock" + depth);
 
 	/* initialise our SX-lock */
-	sx_init(udev->default_sx + 1, "USB config SX lock");
+	sx_init(udev->default_sx + 1, "0123456789ABCDEF - USB config SX lock" + depth);
 
 	usb2_cv_init(udev->default_cv, "WCTRL");
 	usb2_cv_init(udev->default_cv + 1, "UGONE");



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