From: John Ogness <john.ogn...@linutronix.de>

The portdata spinlock can be taken in interrupt context (via
sierra_outdat_callback()).
Disable interrupts when taking the portdata spinlock.

Cc: Johan Hovold <jo...@kernel.org>
Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org>
Signed-off-by: John Ogness <john.ogn...@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bige...@linutronix.de>
---
 drivers/usb/serial/sierra.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index d189f953c891..55956a638f5b 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -770,9 +770,9 @@ static void sierra_close(struct usb_serial_port *port)
                kfree(urb->transfer_buffer);
                usb_free_urb(urb);
                usb_autopm_put_interface_async(serial->interface);
-               spin_lock(&portdata->lock);
+               spin_lock_irq(&portdata->lock);
                portdata->outstanding_urbs--;
-               spin_unlock(&portdata->lock);
+               spin_unlock_irq(&portdata->lock);
        }
 
        sierra_stop_rx_urbs(port);
-- 
2.18.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to