Commit af8f3558 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Adrian Bunk

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: default avatarOleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent ee1aebb4
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment