Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Feb 2013 11:08:11 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r246395 - stable/9/sys/dev/usb/controller
Message-ID:  <201302061108.r16B8BF1088652@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Wed Feb  6 11:08:11 2013
New Revision: 246395
URL: http://svnweb.freebsd.org/changeset/base/246395

Log:
  MFC r246113 and r246126:
  Add missing NULL pointer check.
  
  Reported by:  Lars Engels

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

Modified: stable/9/sys/dev/usb/controller/xhci.c
==============================================================================
--- stable/9/sys/dev/usb/controller/xhci.c	Wed Feb  6 08:29:00 2013	(r246394)
+++ stable/9/sys/dev/usb/controller/xhci.c	Wed Feb  6 11:08:11 2013	(r246395)
@@ -886,6 +886,12 @@ xhci_check_transfer(struct xhci_softc *s
 			 * a short packet also makes the transfer done
 			 */
 			if (td->remainder > 0) {
+				if (td->alt_next == NULL) {
+					DPRINTF(
+					    "short TD has no alternate next\n");
+					xhci_generic_done(xfer);
+					break;
+				}
 				DPRINTF("TD has short pkt\n");
 				if (xfer->flags_int.short_frames_ok ||
 				    xfer->flags_int.isochronous_xfr ||



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