[kernel/f18] Add patch to fix usb_submit_urb error in uvcvideo (rhbz 879462)
Josh Boyer
jwboyer at fedoraproject.org
Mon Mar 11 20:29:16 UTC 2013
commit 7c71bc7d4275f85ccc098104664171d78fe7aced
Author: Josh Boyer <jwboyer at redhat.com>
Date: Mon Mar 11 16:27:54 2013 -0400
Add patch to fix usb_submit_urb error in uvcvideo (rhbz 879462)
kernel.spec | 8 ++++++++
uvcvideo-suspend-fix.patch | 38 ++++++++++++++++++++++++++++++++++++++
2 files changed, 46 insertions(+), 0 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index 944cb26..d2ba57d 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -791,6 +791,9 @@ Patch24105: w1-fix-oops-when-w1_search-is-called-from.patch
#rhbz 911771
Patch24106: serial-8250-Keep-8250.-xxxx-module-options-functiona.patch
+#rhbz 879462
+Patch24107: uvcvideo-suspend-fix.patch
+
# END OF PATCH DEFINITIONS
%endif
@@ -1531,6 +1534,10 @@ ApplyPatch w1-fix-oops-when-w1_search-is-called-from.patch
#rhbz 911771
ApplyPatch serial-8250-Keep-8250.-xxxx-module-options-functiona.patch
+#rhbz 879462
+ApplyPatch uvcvideo-suspend-fix.patch
+
+
# END OF PATCH APPLICATIONS
%endif
@@ -2389,6 +2396,7 @@ fi
# || ||
%changelog
* Mon Mar 11 2013 Josh Boyer <jwboyer at redhat.com>
+- Add patch to fix usb_submit_urb error in uvcvideo (rhbz 879462)
- Add patch to allow "8250." prefix to keep working (rhbz 911771)
- Add patch to fix w1_search oops (rhbz 857954)
- Add patch to fix broken tty handling (rhbz 904182)
diff --git a/uvcvideo-suspend-fix.patch b/uvcvideo-suspend-fix.patch
new file mode 100644
index 0000000..e8d8252
--- /dev/null
+++ b/uvcvideo-suspend-fix.patch
@@ -0,0 +1,38 @@
+From a82a45f65377b05fe8cd3167c7b0a70c508356b8 Mon Sep 17 00:00:00 2001
+From: Oliver Neukum <oliver at neukum.org>
+Date: Thu, 10 Jan 2013 07:04:55 -0300
+Subject: [PATCH] [media] uvcvideo: Fix race of open and suspend in error case
+
+Ming Lei reported:
+IMO, there is a minor fault in the error handling path of
+uvc_status_start() inside uvc_v4l2_open(), and the 'users' count should
+have been decreased before usb_autopm_put_interface(). In theory, a [URB
+resubmission] warning can be triggered when the device is opened just
+between usb_autopm_put_interface() and atomic_dec(&stream->dev->users).
+The fix is trivial.
+
+Reported-by: Ming Lei <tom.leiming at gmail.com>
+Signed-off-by: Oliver Neukum <oneukum at suse.de>
+Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab at redhat.com>
+---
+ drivers/media/usb/uvc/uvc_v4l2.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
+index 97a4ffd..b2dc326 100644
+--- a/drivers/media/usb/uvc/uvc_v4l2.c
++++ b/drivers/media/usb/uvc/uvc_v4l2.c
+@@ -501,8 +501,8 @@ static int uvc_v4l2_open(struct file *file)
+ if (atomic_inc_return(&stream->dev->users) == 1) {
+ ret = uvc_status_start(stream->dev);
+ if (ret < 0) {
+- usb_autopm_put_interface(stream->dev->intf);
+ atomic_dec(&stream->dev->users);
++ usb_autopm_put_interface(stream->dev->intf);
+ kfree(handle);
+ return ret;
+ }
+--
+1.8.1.2
+
More information about the scm-commits
mailing list