Hi Dan, On Tue, Apr 05, 2022 at 10:01:34AM -0500, Dan Vacura wrote:
Looks like we found the same issue, I submitted the same change the other week here: https://lore.kernel.org/all/20220331184024.23918-1-w36195@xxxxxxxxxxxx/ One difference is you had the reset outside of the queue lock. I figured to keep it within the lock since we can get a cancel while the pump worker is running and this can negate the reset. Do you agree?
Yes! Your patch is to favour and mine can be dropped from this series. Thanks, Michael
On Tue, Apr 05, 2022 at 11:43:16AM +0300, Sergey Shtylyov wrote:Hello! On 4/3/22 2:39 AM, Michael Grzeschik wrote: > On uvcg_queue_cancel the buf_used counter has to be reset. Since the > encode function uses the variable to decide if the encoded data has > reached the end of frame. Intermediate calls of uvcg_queue_cancel can > therefor lead to miscalculations in the encode functions, if buf_used Therefore? > was not properly reset. > > Signed-off-by: Michael Grzeschik <m.grzeschik@xxxxxxxxxxxxxx> [...] MBR, Sergey
-- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Attachment:
signature.asc
Description: PGP signature