usb: forbid memory allocation with I/O during bus reset
usb: forbid memory allocation with I/O during bus reset

If one storage interface or usb network interface(iSCSI case) exists in
current configuration, memory allocation with GFP_KERNEL during
usb_device_reset() might trigger I/O transfer on the storage interface
itself and cause deadlock because the 'us->dev_mutex' is held in
.pre_reset() and the storage interface can't do I/O transfer when the
reset is triggered by other interface, or the error handling can't be
completed if the reset is triggered by the storage itself (error
handling path).

Signed-off-by: Ming Lei <8d0fc11caeb4659419f0ba3104eb4a9d30848d42@canonical.com>
Cc: "David S. Miller" <fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net>
Cc: Eric Dumazet <a0baddf32b28d2f9429941ed4af2fe636e210591@gmail.com>
Cc: David Decotigny <14998dc5e9e79a027ec45935710fe41be85d58ff@google.com>
Cc: Tom Herbert <0786393240831fc3b5d6ed63658cfb1f3b1e6c40@google.com>
Cc: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@elte.hu>
Cc: Jens Axboe <cd8c6775e60d6f67a6984377324e5290df3d5358@kernel.dk>
Cc: Minchan Kim <eee62f459f15dcddf87a8df69e8328e2a2562028@kernel.org>
Cc: Alan Stern <75ea6bb7bfc1186f92d26164de5f9268c9a45b59@rowland.harvard.edu>
Cc: Oliver Neukum <bfee72d94d376f4e00f72b756466867d7f9eb24e@suse.de>
Reviewed-by: Jiri Kosina <ed58f755cc8caaf10c3e8c731a8b86fb8f13d6cb@suse.cz>
Cc: Mel Gorman <2f629c4d93e35c3d371f0463b040c6ef04a5c1e5@csn.ul.ie>
Cc: KAMEZAWA Hiroyuki <634f508bd7c47cf0ee4126243675c3e598920fbc@jp.fujitsu.com>
Cc: Michal Hocko <829500b200af6c2a0eca4dfd5c388e6b8fbe8dc6@suse.cz>
Cc: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@redhat.com>
Cc: Peter Zijlstra <3fddac958924aef220f202ca567388ddab3f14a8@infradead.org>
Cc: "Rafael J. Wysocki" <a11f87183a953ab11f50fbafff689c5a7fa3506c@sisk.pl>
Cc: Greg KH <79e2475f81a6317276bf7cbb3958b20d289b78df@kroah.com>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>

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