USB: serial: sierra: fix potential deadlock at close
authorJohn Ogness <john.ogness@linutronix.de>
Sat, 23 Jun 2018 22:32:11 +0000 (00:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Aug 2018 05:47:15 +0000 (07:47 +0200)
commit5823374e9c4bd92d5c3c4527e55774b2fe52175b
tree86fd7e9d3a0941980c5f906eb2e53f6f82ff3b5a
parentc4db09a6f60a4b70e3845ab9978cf61bcb2a456e
USB: serial: sierra: fix potential deadlock at close

commit e60870012e5a35b1506d7b376fddfb30e9da0b27 upstream.

The portdata spinlock can be taken in interrupt context (via
sierra_outdat_callback()).
Disable interrupts when taking the portdata spinlock when discarding
deferred URBs during close to prevent a possible deadlock.

Fixes: 014333f77c0b ("USB: sierra: fix urb and memory leak on disconnect")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
[ johan: amend commit message and add fixes and stable tags ]
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/sierra.c