[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-stable-commits
Subject:    Patch "[media] uvcvideo: Reset the bytesused field when recycling an erroneous buffer" has been adde
From:       <gregkh () linuxfoundation ! org>
Date:       2012-08-31 17:36:59
Message-ID: 13464346192155 () kroah ! org
[Download RAW message or body]


This is a note to let you know that I've just added the patch titled

    [media] uvcvideo: Reset the bytesused field when recycling an erroneous buffer

to the 3.5-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     uvcvideo-reset-the-bytesused-field-when-recycling-an-erroneous-buffer.patch
and it can be found in the queue-3.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


From 8a3f0ede2b3f5477122060af1a816c6bbf09fcd2 Mon Sep 17 00:00:00 2001
From: Jayakrishnan Memana <jayakrishnan.memana@maxim-ic.com>
Date: Sun, 15 Jul 2012 10:54:03 -0300
Subject: [media] uvcvideo: Reset the bytesused field when recycling an erroneous buffer

From: Jayakrishnan Memana <jayakrishnan.memana@maxim-ic.com>

commit 8a3f0ede2b3f5477122060af1a816c6bbf09fcd2 upstream.

Buffers marked as erroneous are recycled immediately by the driver if
the nodrop module parameter isn't set. The buffer payload size is reset
to 0, but the buffer bytesused field isn't. This results in the buffer
being immediately considered as complete, leading to an infinite loop in
interrupt context.

Fix the problem by resetting the bytesused field when recycling the
buffer.

Signed-off-by: Jayakrishnan Memana <jayakrishnan.memana@maxim-ic.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/drivers/media/video/uvc/uvc_queue.c
+++ b/drivers/media/video/uvc/uvc_queue.c
@@ -338,6 +338,7 @@ struct uvc_buffer *uvc_queue_next_buffer
 	if ((queue->flags & UVC_QUEUE_DROP_CORRUPTED) && buf->error) {
 		buf->error = 0;
 		buf->state = UVC_BUF_STATE_QUEUED;
+		buf->bytesused = 0;
 		vb2_set_plane_payload(&buf->buf, 0, 0);
 		return buf;
 	}


Patches currently in stable-queue which might be from jayakrishnan.memana@maxim-ic.com are

queue-3.5/uvcvideo-reset-the-bytesused-field-when-recycling-an-erroneous-buffer.patch
--
To unsubscribe from this list: send the line "unsubscribe stable-commits" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic