diff options
author | Greg Kroah-Hartman <[email protected]> | 2021-12-14 19:46:21 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2021-12-15 18:40:48 +0100 |
commit | f08adf5add9a071160c68bb2a61d697f39ab0758 (patch) | |
tree | de0fe3e62ddf30bcc6b037fb459a22a307cc3cd4 /net/lapb/lapb_timer.c | |
parent | 99ea221f2e2f2743314e348b25c1e2574b467528 (diff) |
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 <[email protected]>
Reported-by: Szymon Heidrich <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions