diff options
| author | Avichal Rakesh <[email protected]> | 2023-11-08 16:41:01 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2023-11-23 12:32:44 +0000 |
| commit | 991544dc579b636e69defa3eec486fd6f6191e59 (patch) | |
| tree | b326981f130ba8fc726afe171718f993a7d124af /tools/perf/scripts/python | |
| parent | 5a1ccf0c72cf917ff3ccc131d1bb8d19338ffe52 (diff) | |
usb: gadget: uvc: prevent use of disabled endpoint
Currently the set_alt callback immediately disables the endpoint and queues
the v4l2 streamoff event. However, as the streamoff event is processed
asynchronously, it is possible that the video_pump thread attempts to queue
requests to an already disabled endpoint.
This change moves disabling usb endpoint to the end of streamoff event
callback. As the endpoint's state can no longer be used, video_pump is
now guarded by uvc->state as well. To be consistent with the actual
streaming state, uvc->state is now toggled between CONNECTED and STREAMING
from the v4l2 event callback only.
Link: https://lore.kernel.org/[email protected]/
Link: https://lore.kernel.org/[email protected]/
Reviewed-by: Daniel Scally <[email protected]>
Reviewed-by: Michael Grzeschik <[email protected]>
Tested-by: Michael Grzeschik <[email protected]>
Signed-off-by: Avichal Rakesh <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions