diff options
author | kirill <kirill@cvs.openbsd.org> | 2024-11-27 11:37:24 +0000 |
---|---|---|
committer | kirill <kirill@cvs.openbsd.org> | 2024-11-27 11:37:24 +0000 |
commit | c6dbc7489fdc11cfa2ab25eec3c6801f18fcc8db (patch) | |
tree | ec3a73ea6673ca2fed2efa5c8015db2e6ca72687 /sys | |
parent | 73789a503729d0fe137c64e11fea57489647d4df (diff) |
sys/uvideo: add missed abort of transfer pipe in uvideo_vs_close
A bulk transfer cannot timeout and must be aborted on close.
OK mpi@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/uvideo.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c index 41d98780231..ab0a9343717 100644 --- a/sys/dev/usb/uvideo.c +++ b/sys/dev/usb/uvideo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvideo.c,v 1.222 2024/09/01 03:09:00 jsg Exp $ */ +/* $OpenBSD: uvideo.c,v 1.223 2024/11/27 11:37:23 kirill Exp $ */ /* * Copyright (c) 2008 Robert Nagy <robert@openbsd.org> @@ -1935,6 +1935,11 @@ uvideo_vs_close(struct uvideo_softc *sc) { if (sc->sc_vs_cur->bulk_running == 1) { sc->sc_vs_cur->bulk_running = 0; + + /* Bulk thread may sleep in usbd_transfer, abort it */ + if (sc->sc_vs_cur->pipeh) + usbd_abort_pipe(sc->sc_vs_cur->pipeh); + usbd_ref_wait(sc->sc_udev); } |