077: NOIO allocation under usb_lock
Not disabling IO during memory allocation while holding a USB device lock
You should use `GFP_NOIO` instead of `GFP_KERNEL` for memory allocations between `usb_lock_device()` and `usb_unlock_device()` invocations.
Memory allocations with `GFP_KERNEL` flag can cause input/output operations to a storage
device. These operations can fail thus requiring to reset the device.
Therefore `GFP_KERNEL` cannot be safely used between `usb_lock_device()`
and `usb_unlock_device()` incovations. It should be replaced by `GFP_NOIO`.
The following drivers contain this error (in version 2.6.32):
#6 Updated by Vitaly Mordan over 4 years ago
Some functions in "before: ALLOC", "around: ALLOC_AROUND" and "before: ALLOC_WITHOUT" (for example, static inline void *kmalloc(.., gfp_t flags, ..) and static inline void *kzalloc(.., gfp_t flags, ..)) will always return 0, which makes some pathes in program infeasible.