diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2007-01-23 20:04:13 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-23 16:24:25 -0800 |
commit | 982a9e019fcf803319b13366b984a4e52cd66712 (patch) | |
tree | 3735b88060c986aab3fc2b892469b8c396356343 /drivers | |
parent | 34d39c49105104fc553fed1261ddf23a7a38ef88 (diff) |
V4L: 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.
(cherry picked from commit 419dd8378dfa32985672ab7927b4bc827f33b332)
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/video-buf.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/video/video-buf.c b/drivers/media/video/video-buf.c index f429f49901b..3f65fb612ea 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; |