mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 05:04:09 +08:00
V4L/DVB (5123): 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. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
parent
99ddcc7edb
commit
419dd8378d
@ -700,6 +700,7 @@ videobuf_qbuf(struct videobuf_queue *q,
|
||||
goto done;
|
||||
}
|
||||
if (buf->state == STATE_QUEUED ||
|
||||
buf->state == STATE_PREPARED ||
|
||||
buf->state == STATE_ACTIVE) {
|
||||
dprintk(1,"qbuf: buffer is already queued or active.\n");
|
||||
goto done;
|
||||
|
Loading…
Reference in New Issue
Block a user