usb: misc: lvs: fix race condition in disconnect handling
authorOliver Neukum <oneukum@suse.com>
Tue, 14 Mar 2017 11:05:07 +0000 (12:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Mar 2017 09:01:02 +0000 (18:01 +0900)
commitc4ba329cabca7c839ab48fb58b5bcc2582951a48
treeb04794ac64f6884a77d2fab730266f95cb085963
parente4ecd155d2a62246fc7722aeaa5819262904f40b
usb: misc: lvs: fix race condition in disconnect handling

There is a small window during which the an URB may
remain active after disconnect has returned. If in that case
already freed memory may be accessed and executed.

The fix is to poison the URB befotre the work is flushed.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/lvstest.c