diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-12-14 19:46:21 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2021-12-15 20:59:22 +0100 |
commit | aefe2278483e9ecad335d7349cbfa51d49981d12 (patch) | |
tree | e3a43b00dce81f0639638a40f52b98ae0448bb44 /arch/arm/mm/copypage-feroceon.c | |
parent | f9fe8dd7fb420cd53735fb5ebbd5f150e32607a2 (diff) |
FROMGIT: USB: gadget: bRequestType is a bitfield, not a enum
Szymon rightly pointed out that the previous check for the endpoint
direction in bRequestType was not looking at only the bit involved, but
rather the whole value. Normally this is ok, but for some request
types, bits other than bit 8 could be set and the check for the endpoint
length could not stall correctly.
Fix that up by only checking the single bit.
Fixes: 153a2d7e3350 ("USB: gadget: detect too-big endpoint 0 requests")
Cc: Felipe Balbi <balbi@kernel.org>
Reported-by: Szymon Heidrich <szymon.heidrich@gmail.com>
Link: https://lore.kernel.org/r/20211214184621.385828-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit f08adf5add9a071160c68bb2a61d697f39ab0758
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-linus)
Bug: 210292376
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I7e708b2b94433009c87f697346e0515d93454f48
Diffstat (limited to 'arch/arm/mm/copypage-feroceon.c')
0 files changed, 0 insertions, 0 deletions