In case of a disconnect an ongoing flush() has to be made fail.
Nevertheless we cannot be sure that any pending URB has already
finished, so although they will never succeed, they still must
not be touched.
The clean solution for this is to check for WDM_IN_USE
and WDM_DISCONNECTED in flush(). There is no point in ever
clearing WDM_IN_USE, as no further writes make sense.
The issue is as old as the driver.
Fixes: afba937e ("USB: CDC WDM driver")
Signed-off-by: Oliver Neukum <email@example.com>
Cc: stable <firstname.lastname@example.org>
Link: https://email@example.comSigned-off-by: Greg Kroah-Hartman <firstname.lastname@example.org>