[kernel/f16] Apply patch to fix uvcvideo crash (rhbz 836742)
Josh Boyer
jwboyer at fedoraproject.org
Thu Jul 26 15:12:35 UTC 2012
commit 9f67b6884b26743cc80c72485cf05306eec45096
Author: Josh Boyer <jwboyer at redhat.com>
Date: Thu Jul 26 10:17:19 2012 -0400
Apply patch to fix uvcvideo crash (rhbz 836742)
kernel.spec | 9 +++++
...sed-field-when-recycling-erroneous-buffer.patch | 36 ++++++++++++++++++++
2 files changed, 45 insertions(+), 0 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index 1286e8f..d9816f4 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -707,6 +707,9 @@ Patch22056: crypto-aesni-intel-fix-wrong-kfree-pointer.patch
#rhbz 772730
Patch22058: ACPI-AC-check-the-return-value-of-power_supply_register.patch
+#rhbz 836742
+Patch22059: uvcvideo-Reset-bytesused-field-when-recycling-erroneous-buffer.patch
+
#rhbz 714271
Patch22060: CPU-hotplug-cpusets-suspend-Dont-modify-cpusets-during.patch
@@ -1322,6 +1325,9 @@ ApplyPatch crypto-aesni-intel-fix-wrong-kfree-pointer.patch
#rhbz 772730
ApplyPatch ACPI-AC-check-the-return-value-of-power_supply_register.patch
+#rhbz 836742
+ApplyPatch uvcvideo-Reset-bytesused-field-when-recycling-erroneous-buffer.patch
+
#rhbz 714271
ApplyPatch CPU-hotplug-cpusets-suspend-Dont-modify-cpusets-during.patch
@@ -2023,6 +2029,9 @@ fi
# and build.
%changelog
+* Thu Jul 26 2012 Josh Boyer <jwboyer at redhat.com>
+- Apply patch to fix uvcvideo crash (rhbz 836742)
+
* Wed Jul 25 2012 Josh Boyer <jwboyer at redhat.com>
- Drop ARM support. It isn't built in F16.
- Add patch to fix cpu pinning after suspend/resume (rhbz 714271)
diff --git a/uvcvideo-Reset-bytesused-field-when-recycling-erroneous-buffer.patch b/uvcvideo-Reset-bytesused-field-when-recycling-erroneous-buffer.patch
new file mode 100644
index 0000000..6606b7d
--- /dev/null
+++ b/uvcvideo-Reset-bytesused-field-when-recycling-erroneous-buffer.patch
@@ -0,0 +1,36 @@
+From 3771973542a4807b251352253ed22c50e688e573 Mon Sep 17 00:00:00 2001
+From: Jayakrishnan Memana <jayakrishnan.memana at maxim-ic.com>
+Date: Sun, 15 Jul 2012 15:54:03 +0200
+Subject: [PATCH] uvcvideo: Reset the bytesused field when recycling an erroneous buffer
+
+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.
+
+Cc: <stable at vger.kernel.org>
+Signed-off-by: Jayakrishnan Memana <jayakrishnan.memana at maxim-ic.com>
+Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
+---
+ drivers/media/video/uvc/uvc_queue.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/media/video/uvc/uvc_queue.c b/drivers/media/video/uvc/uvc_queue.c
+index 9288fbd..5577381 100644
+--- 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(struct uvc_video_queue *queue,
+ 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;
+ }
+--
+1.7.2.5
+
More information about the scm-commits
mailing list