From fec39e8fa9bf392d8bd4efad9143535f3b8fdf39 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 23 Jan 2007 21:04:13 -0200 Subject: Buf_qbuf: fix: videobuf_queue->stream corruption and lockup From: Oleg Nesterov 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 Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/video-buf.c | 1 + 1 file changed, 1 insertion(+) (limited to 'linux/drivers/media/video/video-buf.c') 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; -- cgit v1.2.3