aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2007-02-20 16:07:19 +0100
committerAdrian Bunk <bunk@stusta.de>2007-02-20 16:07:19 +0100
commitaf8f3558878c9894b8ed08d9273c6357aca313aa (patch)
tree0477059c1f3172dda50578be4b11129501139b81 /drivers
parentee1aebb4a4bffe532d3112353e60d32cc61e8df9 (diff)
V4L/DVB: Buf_qbuf: fix: videobuf_queue->stream corruption and lockup
We are doing ->buf_prepare(buf) before adding buf to q->stream list. This means that videobuf_qbuf() should not try to re-add a STATE_PREPARED buffer. Adrian Bunk: Backported to 2.6.16. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/video-buf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/video/video-buf.c b/drivers/media/video/video-buf.c
index 9ef477523d2..9e77f87edbc 100644
--- a/drivers/media/video/video-buf.c
+++ b/drivers/media/video/video-buf.c
@@ -608,6 +608,7 @@ videobuf_qbuf(struct videobuf_queue *q,
if (buf->memory != b->memory)
goto done;
if (buf->state == STATE_QUEUED ||
+ buf->state == STATE_PREPARED ||
buf->state == STATE_ACTIVE)
goto done;