summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2019-10-21 10:02:41 +0000
committermpi <mpi@openbsd.org>2019-10-21 10:02:41 +0000
commitd5fa6468c519ee84c8a67d80a7b5e9539b79f04e (patch)
treead1fd643cf25ab814e01044a9969f2251248f9e5
parentOptionally log blocked queries when using the block list. (diff)
downloadwireguard-openbsd-d5fa6468c519ee84c8a67d80a7b5e9539b79f04e.tar.xz
wireguard-openbsd-d5fa6468c519ee84c8a67d80a7b5e9539b79f04e.zip
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@
-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);