USB: gadget: f_mass_storage: Defer handling interface changes until it is safe.

Pulling in some code from file_storage.c, we now handle interface changes
in do_set_config(), which is now not called until any pending requests have
been successfully completed or cancelled.

This fixes a race condition that resulted in usb_ep_free_request() being called
while the request is still busy.

Signed-off-by: Mike Lockwood <lockwood@android.com>
1 file changed