queued_count variable was left untouched during the queue reinitialization in __vb2_queue_cancel, what might lead to mismatch between the real number of queued buffers and queued_count variable.
Reported-by: Uwe Kleine-König <[email protected]> Signed-off-by: Marek Szyprowski <[email protected]> CC: Pawel Osciak <[email protected]> --- drivers/media/video/videobuf2-core.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/media/video/videobuf2-core.c b/drivers/media/video/videobuf2-core.c index 6ba1461..6be2f79 100644 --- a/drivers/media/video/videobuf2-core.c +++ b/drivers/media/video/videobuf2-core.c @@ -1196,6 +1196,7 @@ static void __vb2_queue_cancel(struct vb2_queue *q) * has not already dequeued before initiating cancel. */ INIT_LIST_HEAD(&q->done_list); + atomic_set(&q->queued_count, 0); wake_up_all(&q->done_wq); /* -- 1.7.1.569.g6f426 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
