Skip to content
Commit 8a3f0ede authored by Jayakrishnan Memana's avatar Jayakrishnan Memana Committed by Mauro Carvalho Chehab
Browse files

[media] uvcvideo: Reset the bytesused field when recycling an erroneous buffer



Buffers marked as erroneous are recycled immediately by the driver if
the nodrop module parameter isn't set. The buffer payload size is reset
to 0, but the buffer bytesused field isn't. This results in the buffer
being immediately considered as complete, leading to an infinite loop in
interrupt context.

Fix the problem by resetting the bytesused field when recycling the
buffer.

Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarJayakrishnan Memana <jayakrishnan.memana@maxim-ic.com>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 8762541f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment