]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: iowarrior: fix deadlock on disconnect
authorOliver Neukum <oneukum@suse.com>
Thu, 8 Aug 2019 09:27:28 +0000 (11:27 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 10 Dec 2019 18:01:36 +0000 (18:01 +0000)
commit596710903a2fe55a66089a22b4dbea2390f2f5d8
treecf6fc63deb89d30a69d0e20ea063b80088bc32bf
parentdaec20c79bdc41b44b651aa8c9506cb138a83952
usb: iowarrior: fix deadlock on disconnect

commit c468a8aa790e0dfe0a7f8a39db282d39c2c00b46 upstream.

We have to drop the mutex before we close() upon disconnect()
as close() needs the lock. This is safe to do by dropping the
mutex as intfdata is already set to NULL, so open() will fail.

Fixes: 03f36e885fc26 ("USB: open disconnect race in iowarrior")
Reported-by: syzbot+a64a382964bf6c71a9c0@syzkaller.appspotmail.com
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Link: https://lore.kernel.org/r/20190808092728.23417-1-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/misc/iowarrior.c