Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=36a63ee34b568de8d0762f9b07f34ae5caae7724 Commit: 36a63ee34b568de8d0762f9b07f34ae5caae7724 Parent: 5ad5e4845b441a00e4165e2c2e3ac8507db9cbe6 Author: Sakari Ailus <[EMAIL PROTECTED]> AuthorDate: Fri May 4 12:19:59 2007 -0300 Committer: Mauro Carvalho Chehab <[EMAIL PROTECTED]> CommitDate: Wed May 9 10:12:56 2007 -0300
V4L/DVB (5603): V4L: Prevent queueing queued buffers. videobuf_qbuf queues buffers to q->stream but does not properly check the state of the buffer before queueing. It was possible to queue buffers that already were in the queue. Only buffers that are in states STATE_NEEDS_INIT and STATE_IDLE can be queued. Signed-off-by: Sakari Ailus <[EMAIL PROTECTED]> Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]> --- drivers/media/video/video-buf.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/media/video/video-buf.c b/drivers/media/video/video-buf.c index 459786f..a32dfbe 100644 --- a/drivers/media/video/video-buf.c +++ b/drivers/media/video/video-buf.c @@ -702,9 +702,7 @@ videobuf_qbuf(struct videobuf_queue *q, dprintk(1,"qbuf: memory type is wrong.\n"); goto done; } - if (buf->state == STATE_QUEUED || - buf->state == STATE_PREPARED || - buf->state == STATE_ACTIVE) { + if (buf->state != STATE_NEEDS_INIT && buf->state != STATE_IDLE) { dprintk(1,"qbuf: buffer is already queued or active.\n"); goto done; } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html