All of lore.kernel.org
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: gregkh@linuxfoundation.org, balbi@ti.com,
	ben.hutchings@codethink.co.uk, d.eccher@gmail.com,
	fengguang.wu@intel.com
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "Revert "usb: gadget: inode.c: fix unbalanced spin_lock in ep0_write"" has been added to the 3.18-stable tree
Date: Tue, 17 Oct 2017 16:15:55 +0200	[thread overview]
Message-ID: <150824975546189@kroah.com> (raw)


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@vger.kernel.org> know about it.


>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;
 


Patches currently in stable-queue which might be from gregkh@linuxfoundation.org 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

                 reply	other threads:[~2017-10-17 14:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=150824975546189@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=balbi@ti.com \
    --cc=ben.hutchings@codethink.co.uk \
    --cc=d.eccher@gmail.com \
    --cc=fengguang.wu@intel.com \
    --cc=stable-commits@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.