summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2019-10-21 10:02:42 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2019-10-21 10:02:42 +0000
commit7ee1c72f8a0d6d2f505cc4be048ff12092f1bd4d (patch)
tree082d7e6b783767a5b5054a0d4b82f90629381acb /sys/dev/usb
parente60535e9c701a5372c0478e53729dc99dcaefdf1 (diff)
Mark recycled USB `xfer' as NOT_STARTED to not confuse HCD abort methods.
Prevent an infinite loop when aborting ulpt(4)'s pipe after an I/O error. Found by and ok stsp@
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/usbdi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c
index e51b4b31947..3aaeeda087d 100644
--- a/sys/dev/usb/usbdi.c
+++ b/sys/dev/usb/usbdi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbdi.c,v 1.101 2019/10/06 17:11:51 mpi Exp $ */
+/* $OpenBSD: usbdi.c,v 1.102 2019/10/21 10:02:41 mpi Exp $ */
/* $NetBSD: usbdi.c,v 1.103 2002/09/27 15:37:38 provos Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdi.c,v 1.28 1999/11/17 22:33:49 n_hibma Exp $ */
@@ -294,6 +294,7 @@ usbd_transfer(struct usbd_xfer *xfer)
usbd_dump_queue(pipe);
#endif
xfer->done = 0;
+ xfer->status = USBD_NOT_STARTED;
if (pipe->aborting)
return (USBD_CANCELLED);