summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3/core.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2021-05-18 16:18:35 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-21 14:24:46 +0200
commit4f2629ea67e7225c3fd292c7fe4f5b3c9d6392de (patch)
tree8c10fd9f0fb99596d7bc1a344fb3b8dc270f1704 /drivers/usb/dwc3/core.c
parentd07f6ca923ea0927a1024dfccafc5b53b61cfecc (diff)
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>
Diffstat (limited to 'drivers/usb/dwc3/core.c')
0 files changed, 0 insertions, 0 deletions