mirror-linux/drivers/usb/core
Alan Stern 4f2629ea67 USB: usbfs: Don't WARN about excessively large memory allocations
Syzbot found that the kernel generates a WARNing if the user tries to
submit a bulk transfer through usbfs with a buffer that is way too
large.  This isn't a bug in the kernel; it's merely an invalid request
from the user and the usbfs code does handle it correctly.

In theory the same thing can happen with async transfers, or with the
packet descriptor table for isochronous transfers.

To prevent the MM subsystem from complaining about these bad
allocation requests, add the __GFP_NOWARN flag to the kmalloc calls
for these buffers.

CC: Andrew Morton <akpm@linux-foundation.org>
CC: <stable@vger.kernel.org>
Reported-and-tested-by: syzbot+882a85c0c8ec4a3e2281@syzkaller.appspotmail.com
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20210518201835.GA1140918@rowland.harvard.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-21 14:24:46 +02:00
..
Kconfig
Makefile
buffer.c
config.c usb: fix a few cases of -Wfallthrough 2020-11-13 15:20:52 +01:00
devices.c usb: common: add function to get interval expressed in us unit 2021-03-10 09:37:17 +01:00
devio.c USB: usbfs: Don't WARN about excessively large memory allocations 2021-05-21 14:24:46 +02:00
driver.c USB: core: rename usb_driver_claim_interface() data parameter 2021-03-23 12:39:39 +01:00
endpoint.c usb: common: add function to get interval expressed in us unit 2021-03-10 09:37:17 +01:00
file.c
generic.c
hcd-pci.c
hcd.c usb: core: Track SuperSpeed Plus GenXxY 2021-03-23 13:12:37 +01:00
hub.c usb: core: hub: fix race condition about TRSMRCY of resume 2021-05-13 16:00:24 +02:00
hub.h usb: core: reduce power-on-good delay time of root hub 2021-04-10 10:45:48 +02:00
ledtrig-usbport.c
message.c USB: core: drop pipe-type check from new control-message helpers 2020-12-07 15:23:24 +01:00
notify.c
of.c
otg_productlist.h
phy.c
phy.h
port.c Revert "usb: Link the ports to the connectors they are attached to" 2021-04-12 14:36:02 +02:00
quirks.c USB: Add reset-resume quirk for WD19's Realtek Hub 2021-04-22 10:52:56 +02:00
sysfs.c usb: core: sysfs: Check for SSP rate in speed attr 2021-03-23 13:18:22 +01:00
urb.c
usb-acpi.c
usb.c usb: Iterator for ports 2021-04-09 16:00:00 +02:00
usb.h