All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: stable@vger.kernel.org
Cc: Johan Hovold <johan@kernel.org>, Jiri Slaby <jslaby@suse.cz>
Subject: [patch added to 3.12-stable] USB: serial: quatech2: fix sleep-while-atomic in close
Date: Sat, 21 Jan 2017 08:40:21 +0100	[thread overview]
Message-ID: <20170121074102.25260-24-jslaby@suse.cz> (raw)
In-Reply-To: <20170121074102.25260-1-jslaby@suse.cz>

From: Johan Hovold <johan@kernel.org>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit f09d1886a41e9063b43da493ef0e845ac8afd2fa upstream.

The write URB was being killed using the synchronous interface while
holding a spin lock in close().

Simply drop the lock and busy-flag update, something which would have
been taken care of by the completion handler if the URB was in flight.

Fixes: f7a33e608d9a ("USB: serial: add quatech2 usb to serial driver")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/usb/serial/quatech2.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/usb/serial/quatech2.c b/drivers/usb/serial/quatech2.c
index 58ab9e52a938..d0ee758dff0b 100644
--- a/drivers/usb/serial/quatech2.c
+++ b/drivers/usb/serial/quatech2.c
@@ -409,16 +409,12 @@ static void qt2_close(struct usb_serial_port *port)
 {
 	struct usb_serial *serial;
 	struct qt2_port_private *port_priv;
-	unsigned long flags;
 	int i;
 
 	serial = port->serial;
 	port_priv = usb_get_serial_port_data(port);
 
-	spin_lock_irqsave(&port_priv->urb_lock, flags);
 	usb_kill_urb(port_priv->write_urb);
-	port_priv->urb_in_use = false;
-	spin_unlock_irqrestore(&port_priv->urb_lock, flags);
 
 	/* flush the port transmit buffer */
 	i = usb_control_msg(serial->dev,
-- 
2.11.0


  parent reply	other threads:[~2017-01-21  7:41 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-21  7:39 [patch added to 3.12-stable] ftrace/x86: Set ftrace_stub to weak to prevent gcc from using short jumps to it Jiri Slaby
2017-01-21  7:39 ` [patch added to 3.12-stable] usb: xhci: apply XHCI_PME_STUCK_QUIRK to Intel Broxton-M platforms Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] usb: xhci: applying XHCI_PME_STUCK_QUIRK to Intel BXT B0 host Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] usb: dwc3: pci: Add PCI ID for Intel Braswell Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] usb: dwc3: pci: add support for Intel Sunrise Point PCH Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] usb: dwc3: pci: add support for Intel Broxton SOC Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] usb: dwc3: pci: add ID for one more Intel Broxton platform Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] usb: dwc3: pci: add Intel Kabylake PCI ID Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] ALSA: hda - Fix up GPIO for ASUS ROG Ranger Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] ALSA: hda - Apply asus-mode8 fixup to ASUS X71SL Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] ARM: davinci: da850: don't add emac clock to lookup table twice Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] usb: storage: unusual_uas: Add JMicron JMS56x to unusual device Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] usb: gadgetfs: restrict upper bound on device configuration size Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: gadgetfs: fix unbounded memory allocation bug Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: gadgetfs: fix use-after-free bug Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: gadgetfs: fix checks of wTotalLength in config descriptors Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: fix problems with duplicate endpoint addresses Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: dummy-hcd: fix bug in stop_activity (handle ep0) Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] usb: gadget: composite: Test get_alt() presence instead of set_alt() Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] xhci: workaround for hosts missing CAS bit Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] usb: xhci: apply XHCI_PME_STUCK_QUIRK to Intel Apollo Lake Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] xhci: free xhci virtual devices with leaf nodes first Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: serial: omninet: fix NULL-derefs at open and disconnect Jiri Slaby
2017-01-21  7:40 ` Jiri Slaby [this message]
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: serial: pl2303: fix NULL-deref at open Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: serial: keyspan_pda: verify endpoints at probe Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: serial: spcp8x5: fix NULL-deref at open Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: serial: io_ti: " Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: serial: io_ti: fix another " Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: serial: iuu_phoenix: fix " Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: serial: garmin_gps: fix memory leak on failed URB submit Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: serial: ti_usb_3410_5052: fix NULL-deref at open Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: serial: io_edgeport: " Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: serial: oti6858: " Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: serial: cyberjack: " Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: serial: kobil_sct: fix NULL-deref in write Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: serial: mos7840: fix NULL-deref at open Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: serial: mos7720: " Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: serial: mos7720: fix use-after-free on probe errors Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: serial: mos7720: fix parport " Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: serial: mos7720: fix parallel probe Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] usb: xhci-mem: use passed in GFP flags instead of GFP_KERNEL Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] usb: dwc3: pci: add Intel Gemini Lake PCI ID Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] usb: musb: Fix trying to free already-free IRQ 4 Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] usb: hub: Move hub_port_disable() to fix warning if PM is disabled Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] ALSA: usb-audio: Fix bogus error return in snd_usb_create_stream() Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: serial: kl5kusb105: abort on open exception path Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: phy: am335x-control: fix device and of_node leaks Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] USB: serial: io_ti: bind to interface after fw download Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] staging: iio: ad7606: fix improper setting of oversampling pins Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] usb: dwc3: gadget: always unmap EP0 requests Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] cris: Only build flash rescue image if CONFIG_ETRAX_AXISFLASHMAP is selected Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] hwmon: (ds620) Fix overflows seen when writing temperature limits Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] hwmon: (g762) Fix overflows and crash seen when writing limit attributes Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] clk: clk-wm831x: fix a logic error Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] iommu/amd: Fix the left value check of cmd buffer Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] scsi: mvsas: fix command_active typo Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] target/iscsi: Fix double free in lio_target_tiqn_addtpg() Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] mmc: mmc_test: Uninitialized return value Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] md: MD_RECOVERY_NEEDED is set for mddev->recovery Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] powerpc/pci/rpadlpar: Fix device reference leaks Jiri Slaby
2017-01-21  7:40 ` [patch added to 3.12-stable] cred/userns: define current_user_ns() as a function Jiri Slaby
2017-01-21  7:41 ` [patch added to 3.12-stable] net: ti: cpmac: Fix compiler warning due to type confusion Jiri Slaby
2017-01-21  7:41 ` [patch added to 3.12-stable] tick/broadcast: Prevent NULL pointer dereference Jiri Slaby
2017-01-21  7:41 ` [patch added to 3.12-stable] usb: gadget: composite: always set ep->mult to a sensible value Jiri Slaby

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=20170121074102.25260-24-jslaby@suse.cz \
    --to=jslaby@suse.cz \
    --cc=johan@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.