svn commit: r246396 - stable/8/sys/dev/usb/controller

Hans Petter Selasky hselasky at FreeBSD.org
Wed Feb 6 11:10:42 UTC 2013


Author: hselasky
Date: Wed Feb  6 11:10:41 2013
New Revision: 246396
URL: http://svnweb.freebsd.org/changeset/base/246396

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

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

Modified: stable/8/sys/dev/usb/controller/xhci.c
==============================================================================
--- stable/8/sys/dev/usb/controller/xhci.c	Wed Feb  6 11:08:11 2013	(r246395)
+++ stable/8/sys/dev/usb/controller/xhci.c	Wed Feb  6 11:10:41 2013	(r246396)
@@ -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 ||


More information about the svn-src-stable-8 mailing list