[patch 17/18] V4L: buf_qbuf: fix videobuf_queue->stream corruption and lockup

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Greg KH
Date: Tuesday, February 20, 2007 - 6:51 pm

-stable review patch.  If anyone has any objections, please let us know.

------------------
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.

(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>

---
 drivers/media/video/video-buf.c |    1 +
 1 file changed, 1 insertion(+)

--- linux-2.6.18.7.orig/drivers/media/video/video-buf.c
+++ linux-2.6.18.7/drivers/media/video/video-buf.c
@@ -695,6 +695,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;

--
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 00/18] 2.6.18-stable review, Greg KH, (Tue Feb 20, 6:49 pm)
[patch 01/18] bcm43xx: Fix for oops on resume, Greg KH, (Tue Feb 20, 6:49 pm)
[patch 03/18] Dont leak NT bit into next task, Greg KH, (Tue Feb 20, 6:49 pm)
[patch 13/18] V4L: cx88: Fix lockup on suspend, Greg KH, (Tue Feb 20, 6:51 pm)
[patch 15/18] V4L: fix ks0127 status flags, Greg KH, (Tue Feb 20, 6:51 pm)
[patch 17/18] V4L: buf_qbuf: fix videobuf_queue->stream co ..., Greg KH, (Tue Feb 20, 6:51 pm)
Re: [patch 00/18] 2.6.18-stable review, S.Çağlar, (Wed Feb 21, 4:55 am)
Re: [stable] [patch 00/18] 2.6.18-stable review, Greg KH, (Wed Feb 21, 10:34 am)
Re: [stable] [patch 00/18] 2.6.18-stable review, S.Çağlar, (Wed Feb 21, 11:30 am)
Re: [stable] [patch 00/18] 2.6.18-stable review, Ismail , (Wed Feb 21, 11:45 am)
Re: [patch 13/18] V4L: cx88: Fix lockup on suspend, Michael Krufky, (Wed Feb 21, 6:14 pm)
Re: [stable] [patch 00/18] 2.6.18-stable review, Willy Tarreau, (Wed Feb 21, 10:42 pm)
Re: [patch 01/18] bcm43xx: Fix for oops on resume, Pavel Machek, (Thu Feb 22, 10:25 pm)
Re: [patch 00/18] 2.6.18-stable review, Hugh Dickins, (Fri Feb 23, 1:21 pm)
Re: [stable] [patch 00/18] 2.6.18-stable review, Chris Wright, (Fri Feb 23, 1:34 pm)
Re: [stable] [patch 00/18] 2.6.18-stable review, Hugh Dickins, (Fri Feb 23, 2:13 pm)
Re: [patch 01/18] bcm43xx: Fix for oops on resume, Larry Finger, (Sat Feb 24, 7:30 pm)
Re: [patch 01/18] bcm43xx: Fix for oops on resume, Andrew Morton, (Sun Feb 25, 1:53 am)
Re: [stable] [patch 00/18] 2.6.18-stable review, Adrian Bunk, (Sun Feb 25, 5:00 pm)
Re: [patch 00/18] 2.6.18-stable review, Adrian Bunk, (Sun Feb 25, 5:18 pm)
Re: [patch 00/18] 2.6.18-stable review, S.Çağlar, (Mon Mar 5, 6:44 am)
Re: [patch 00/18] 2.6.18-stable review, Greg KH, (Mon Mar 5, 12:26 pm)
Re: [patch 00/18] 2.6.18-stable review, S.Çağlar, (Mon Mar 5, 1:13 pm)