]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Oct 2017 14:15:54 +0000 (16:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Oct 2017 14:15:54 +0000 (16:15 +0200)
added patches:
revert-usb-gadget-inode.c-fix-unbalanced-spin_lock-in-ep0_write.patch

queue-3.18/revert-usb-gadget-inode.c-fix-unbalanced-spin_lock-in-ep0_write.patch [new file with mode: 0644]
queue-3.18/series

diff --git a/queue-3.18/revert-usb-gadget-inode.c-fix-unbalanced-spin_lock-in-ep0_write.patch b/queue-3.18/revert-usb-gadget-inode.c-fix-unbalanced-spin_lock-in-ep0_write.patch
new file mode 100644 (file)
index 0000000..eb99ba6
--- /dev/null
@@ -0,0 +1,36 @@
+From d88bb4defd4846ab3cdac1567aa3ab23997305cd Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Tue, 17 Oct 2017 16:12:49 +0200
+Subject: Revert "usb: gadget: inode.c: fix unbalanced spin_lock in ep0_write"
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+This reverts commit abb540b5397674243994c5327146b6fed7339b71 which is
+commit b7bd98b7db9f upstream.  I had added it to make another patch
+apply cleanly, but as Ben points out, that was wrong.
+
+Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
+Reported-by: kbuild test robot <fengguang.wu@intel.com>
+Cc: David Eccher <d.eccher@gmail.com>
+Cc: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
+
+---
+ drivers/usb/gadget/legacy/inode.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/gadget/legacy/inode.c
++++ b/drivers/usb/gadget/legacy/inode.c
+@@ -1231,10 +1231,11 @@ ep0_write (struct file *fd, const char _
+                                               dev->gadget->ep0, dev->req,
+                                               GFP_KERNEL);
+                               }
+-                              spin_lock_irq(&dev->lock);
+                               --dev->udc_usage;
+                               if (retval < 0) {
++                                      spin_lock_irq (&dev->lock);
+                                       clean_req (dev->gadget->ep0, dev->req);
++                                      spin_unlock_irq (&dev->lock);
+                               } else
+                                       retval = len;
index 9a2699de69902ec76be2905737a8b79f77ee8116..81a5d38007725771836f3556ceca98f1342660a9 100644 (file)
@@ -17,3 +17,4 @@ usb-serial-option-add-support-for-tp-link-lte-module.patch
 usb-serial-qcserial-add-dell-dw5818-dw5819.patch
 usb-serial-console-fix-use-after-free-after-failed-setup.patch
 alsa-seq-fix-missing-null-check-at-remove_events-ioctl.patch
+revert-usb-gadget-inode.c-fix-unbalanced-spin_lock-in-ep0_write.patch