From: Oleg Nesterov Date: Tue, 23 Jan 2007 23:04:13 +0000 (-0300) Subject: V4L/DVB (5123): Buf_qbuf: fix: videobuf_queue->stream corruption and lockup X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=419dd8378dfa32985672ab7927b4bc827f33b332;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Mauro Carvalho Chehab --- 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, 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;