aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2007-01-23 18:04:13 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-01-23 19:00:21 -0500
commit419dd8378dfa32985672ab7927b4bc827f33b332 (patch)
tree1dd1dad1ae3593a7042b993fd21cbdee626a9ac8 /drivers/media
parent99ddcc7edbb6b1d35a542f6bf0383f1f5a1aa0b0 (diff)
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>
Diffstat (limited to 'drivers/media')
-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 635d102c86f0..6504a5866849 100644
--- a/drivers/media/video/video-buf.c
+++ b/drivers/media/video/video-buf.c
@@ -700,6 +700,7 @@ videobuf_qbuf(struct videobuf_queue *q,
700 goto done; 700 goto done;
701 } 701 }
702 if (buf->state == STATE_QUEUED || 702 if (buf->state == STATE_QUEUED ||
703 buf->state == STATE_PREPARED ||
703 buf->state == STATE_ACTIVE) { 704 buf->state == STATE_ACTIVE) {
704 dprintk(1,"qbuf: buffer is already queued or active.\n"); 705 dprintk(1,"qbuf: buffer is already queued or active.\n");
705 goto done; 706 goto done;