Date: Fri, 15 Sep 2006 15:09:33 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 106149 for review Message-ID: <200609151509.k8FF9X6C002783@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=106149 Change 106149 by hselasky@hselasky_mini_itx on 2006/09/15 15:09:28 The "ucom" layer currently only supports devices that are in the "ucom_devclass", due to the need for unique unit numbers. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/ucom.c#8 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/ucom.c#8 (text+ko) ==== @@ -153,6 +153,15 @@ mtx_assert(&Giant, MA_OWNED); + if (device_get_devclass(dev) != ucom_devclass) { + /* NOTE: if all devices are not in the same + * devclass, we get duplicate unit numbers + * which will crash the TTY layer! + */ + error = EINVAL; + goto done; + } + unit = device_get_unit(dev); tp = ttyalloc();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609151509.k8FF9X6C002783>