usblp: fix race between disconnect() and read()
commit6c56942bd2e6fe4f031fff103de4866948d1be50
authorOliver Neukum <oneukum@suse.com>
Thu, 17 Sep 2020 10:34:27 +0000 (17 12:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Sep 2020 10:40:44 +0000 (23 12:40 +0200)
tree78bac286f30be286ca89528493059746e72ed23c
parent56ad2cab0845ce404305d91f9a9bfea47b9136dd
usblp: fix race between disconnect() and read()

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>
drivers/usb/class/usblp.c