summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-01-23 21:04:13 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-01-23 21:04:13 -0200
commitfec39e8fa9bf392d8bd4efad9143535f3b8fdf39 (patch)
treeb862c6031a4e8e31c94dce71a81fefcaf40173ec /linux
parent1809acf93af1cfd4f08ca1f44534b4b5e16ed930 (diff)
downloadmediapointer-dvb-s2-fec39e8fa9bf392d8bd4efad9143535f3b8fdf39.tar.gz
mediapointer-dvb-s2-fec39e8fa9bf392d8bd4efad9143535f3b8fdf39.tar.bz2
Buf_qbuf: fix: videobuf_queue->stream corruption and lockup
From: Oleg Nesterov <oleg@tv-sign.ru> 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 'linux')
-rw-r--r--linux/drivers/media/video/video-buf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/linux/drivers/media/video/video-buf.c b/linux/drivers/media/video/video-buf.c
index 6d6a74c60..4e359bc33 100644
--- a/linux/drivers/media/video/video-buf.c
+++ b/linux/drivers/media/video/video-buf.c
@@ -706,6 +706,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;