]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
usblp: fix race between disconnect() and read()
authorOliver Neukum <oneukum@suse.com>
Thu, 17 Sep 2020 10:34:27 +0000 (12:34 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 9 Nov 2020 13:46:58 +0000 (14:46 +0100)
commita7ecc59b2133587d265f3af5ed41c38b35e8ecce
tree7e0a6e45ab695e6e7be495d65f9e0f79a7d322fb
parent67885ca2cb22fedc7c360db7f881a95561d7c42e
usblp: fix race between disconnect() and read()

BugLink: https://bugs.launchpad.net/bugs/1896828
commit 9cdabcb3ef8c24ca3a456e4db7b012befb688e73 upstream.

read() needs to check whether the device has been
disconnected before it tries to talk to the device.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Reported-by: syzbot+be5b5f86a162a6c281e6@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20200917103427.15740-1-oneukum@suse.com
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: William Breathitt Gray <william.gray@canonical.com>
drivers/usb/class/usblp.c