[media] media: vb2: reset queued list on REQBUFS(0) call
authorMarek Szyprowski <m.szyprowski@samsung.com>
Tue, 25 Oct 2011 06:07:59 +0000 (03:07 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 8 Nov 2011 11:05:41 +0000 (09:05 -0200)
Queued list was not reset on REQBUFS(0) call. This caused to enqueue a
freed buffer to the driver.

Reported-by: Angela Wan <angela.j.wan@gmail.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/videobuf2-core.c

index e7c52ff3c76138eb94601e9304bd85c2402b1fb1..95a3f5e82aef14c74a81045baa26874eb008e7c1 100644 (file)
@@ -265,6 +265,7 @@ static void __vb2_queue_free(struct vb2_queue *q, unsigned int buffers)
        q->num_buffers -= buffers;
        if (!q->num_buffers)
                q->memory = 0;
+       INIT_LIST_HEAD(&q->queued_list);
 }
 
 /**