Revision 4fd09e233fc9a8824c0a01c204ece52a291d2813 authored by Kieran Bingham on 14 November 2017, 12:52:23 UTC, committed by Jeffrey Mouroux on 18 January 2018, 01:47:57 UTC
With asynchronous handling of the URBs from the USB Complete handler, we get a continual stream of packets being received while we are attempting to shutdown the stream. Packets that have already been received and processed are on a work-queue, but during stream shutdown the URBs that those packets belong to are killed and free'd. To prevent this race from causing invalid memory accesses, prevent new URBs from being processed when uvc_stop_streaming() is called by introducing a new flag "UVC_QUEUE_STOPPING" into the queue, and checking this when processing the URB to be queued. With this, we can flush the work queue, and commence a normal pipe shutdown. Work tasks that are already queued are processed, but the URBs are prevented from being re-submitted to the USB stack. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
1 parent 78c8897
File | Mode | Size |
---|---|---|
Makefile | -rw-r--r-- | 383 bytes |
generic_mpih-add1.c | -rw-r--r-- | 2.0 KB |
generic_mpih-lshift.c | -rw-r--r-- | 2.1 KB |
generic_mpih-mul1.c | -rw-r--r-- | 1.9 KB |
generic_mpih-mul2.c | -rw-r--r-- | 1.9 KB |
generic_mpih-mul3.c | -rw-r--r-- | 1.9 KB |
generic_mpih-rshift.c | -rw-r--r-- | 2.1 KB |
generic_mpih-sub1.c | -rw-r--r-- | 2.0 KB |
longlong.h | -rw-r--r-- | 39.6 KB |
mpi-bit.c | -rw-r--r-- | 1.5 KB |
mpi-cmp.c | -rw-r--r-- | 1.6 KB |
mpi-inline.h | -rw-r--r-- | 3.3 KB |
mpi-internal.h | -rw-r--r-- | 7.8 KB |
mpi-pow.c | -rw-r--r-- | 8.4 KB |
mpicoder.c | -rw-r--r-- | 9.0 KB |
mpih-cmp.c | -rw-r--r-- | 2.0 KB |
mpih-div.c | -rw-r--r-- | 5.8 KB |
mpih-mul.c | -rw-r--r-- | 14.2 KB |
mpiutil.c | -rw-r--r-- | 2.7 KB |
Computing file changes ...