]> git.baikalelectronics.ru Git - kernel.git/commit
usbnet: fix memory allocation in helpers
authorOliver Neukum <oneukum@suse.com>
Tue, 28 Jun 2022 09:35:17 +0000 (11:35 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 30 Jun 2022 03:36:45 +0000 (20:36 -0700)
commitc1f2861dba24bade205c2db49dd8c95a992083ee
treee52751e274400cfcf79a1fd94ffea7be23e80c6e
parente7aaa2d567e5138b0909cd8a4e893c4fe1d8eb0c
usbnet: fix memory allocation in helpers

usbnet provides some helper functions that are also used in
the context of reset() operations. During a reset the other
drivers on a device are unable to operate. As that can be block
drivers, a driver for another interface cannot use paging
in its memory allocations without risking a deadlock.
Use GFP_NOIO in the helpers.

Fixes: ebcf9f7651e6d ("usbnet: introduce usbnet 3 command helpers")
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Link: https://lore.kernel.org/r/20220628093517.7469-1-oneukum@suse.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/usb/usbnet.c