usb: serial: prevent suspend/resume from racing against probe/remove
usb: serial: prevent suspend/resume from racing against probe/remove

Some usb-serial drivers may access port data in their suspend/
resume functions. Such drivers must always verify the validity
of the data as both suspend and resume can be called both before
usb_serial_device_probe and after usb_serial_device_remove.

But the port data may be invalidated during port_probe and
port_remove. This patch prevents the race against suspend and
resume by disabling suspend while port_probe or port_remove is
running.

Suggested-by: Alan Stern <75ea6bb7bfc1186f92d26164de5f9268c9a45b59@rowland.harvard.edu>
Signed-off-by: Bjørn Mork <8a2957e0063f2abf61bd145b6236a74a3708ac54@mork.no>
Signed-off-by: Greg Kroah-Hartman <4645f7897fd33786a2ee1264d590b3c400559d85@linuxfoundation.org>

KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs