svn commit: r226306 - stable/9/sys/dev/usb/serial

Hans Petter Selasky hselasky at FreeBSD.org
Wed Oct 12 15:43:23 UTC 2011


Author: hselasky
Date: Wed Oct 12 15:43:22 2011
New Revision: 226306
URL: http://svn.freebsd.org/changeset/base/226306

Log:
  MFC r226219
  Fix panic due to re-using in-use modem unit number.
  
  Approved by:	re (kib)

Modified:
  stable/9/sys/dev/usb/serial/usb_serial.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/dev/usb/serial/usb_serial.c
==============================================================================
--- stable/9/sys/dev/usb/serial/usb_serial.c	Wed Oct 12 15:34:25 2011	(r226305)
+++ stable/9/sys/dev/usb/serial/usb_serial.c	Wed Oct 12 15:43:22 2011	(r226306)
@@ -289,6 +289,9 @@ ucom_detach(struct ucom_super_softc *ssc
 {
 	uint32_t subunit;
 
+	if (ssc->sc_subunits == 0)
+		return;		/* not initialized */
+
 	usb_proc_drain(&ssc->sc_tq);
 
 	for (subunit = 0; subunit < ssc->sc_subunits; subunit++) {


More information about the svn-src-stable mailing list