]> www.infradead.org Git - users/dwmw2/linux.git/commit
usbnet: fix memory allocation in helpers
authorOliver Neukum <oneukum@suse.com>
Tue, 28 Jun 2022 09:35:17 +0000 (11:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Jul 2022 15:52:17 +0000 (17:52 +0200)
commiteb1757ca20b8eff7b20373c47198b17bf6fb581d
tree35377ca245c4d43a3d50012c14b0f8d517d618b1
parentfae2a9fb1eaf348ad8732f90d42ebbb971bd7e95
usbnet: fix memory allocation in helpers

commit e65af5403e462ccd7dff6a045a886c64da598c2e upstream.

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: 877bd862f32b8 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/usb/usbnet.c