This is a note to let you know that I've just added the patch titled Revert "usb: gadget: inode.c: fix unbalanced spin_lock in ep0_write" to the 3.18-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: revert-usb-gadget-inode.c-fix-unbalanced-spin_lock-in-ep0_write.patch and it can be found in the queue-3.18 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From d88bb4defd4846ab3cdac1567aa3ab23997305cd Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx> Reported-by: kbuild test robot <fengguang.wu@xxxxxxxxx> Cc: David Eccher <d.eccher@xxxxxxxxx> Cc: Felipe Balbi <balbi@xxxxxx> Signed-off-by: Greg Kroah-Hartman gregkh@xxxxxxxxxxxxxxxxxxx --- 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; Patches currently in stable-queue which might be from gregkh@xxxxxxxxxxxxxxxxxxx are queue-3.18/hid-usbhid-fix-out-of-bounds-bug.patch queue-3.18/ext4-in-ext4_seek_-hole-data-return-enxio-for-negative-offsets.patch queue-3.18/direct-io-prevent-null-pointer-access-in-submit_page_section.patch queue-3.18/alsa-caiaq-fix-stray-urb-at-probe-error-path.patch queue-3.18/kvm-nvmx-fix-guest-cr4-loading-when-emulating-l2-to-l1-exit.patch queue-3.18/alsa-seq-fix-missing-null-check-at-remove_events-ioctl.patch queue-3.18/usb-gadget-composite-fix-use-after-free-in-usb_composite_overwrite_options.patch queue-3.18/alsa-seq-fix-copy_from_user-call-inside-lock.patch queue-3.18/usb-serial-option-add-support-for-tp-link-lte-module.patch queue-3.18/usb-serial-cp210x-add-support-for-elv-tfd500.patch queue-3.18/usb-serial-qcserial-add-dell-dw5818-dw5819.patch queue-3.18/crypto-shash-fix-zero-length-shash-ahash-digest-crash.patch queue-3.18/usb-renesas_usbhs-fix-dmac-sequence-for-receiving-zero-length-packet.patch queue-3.18/revert-usb-gadget-inode.c-fix-unbalanced-spin_lock-in-ep0_write.patch queue-3.18/alsa-seq-fix-use-after-free-at-creating-a-port.patch queue-3.18/usb-serial-console-fix-use-after-free-after-failed-setup.patch queue-3.18/iommu-amd-finish-tlb-flush-in-amd_iommu_unmap.patch queue-3.18/cifs-reconnect-expired-smb-sessions.patch queue-3.18/fix-unbalanced-page-refcounting-in-bio_map_user_iov.patch queue-3.18/alsa-usb-audio-kill-stray-urb-at-exiting.patch