summaryrefslogtreecommitdiff
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorUdipto Goswami <ugoswami@codeaurora.org>2020-09-16 17:20:10 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2020-10-09 04:36:30 -0700
commitae71a4334fc8c44ed59a0b9676b0bfdd19d7d914 (patch)
tree1f762ed7de4103debcbffdcc9be15ab836e2501f /kernel/fork.c
parent7c00471d93449c5c12de94807dd2e3fe696d68ee (diff)
usb: dwc3: ep0: Return from handle_status if ep0_delegate_req succeeds
Currently if the controller receives a standard interface request like 0x81 it goes to ep0_inspect_setup where on the basis of bRequestType it calls ep0_std_request which calls handle_status. Since it is an interface request, it will further call delegate_request which is handles in composite_setup and calls ep0_queue. However, in the implementation of handle_status we have an if check for return value of delegate request. If it returns zero then instead of bailing out from there we break from the switch and go to the return statement of handle_status, which is ep0_queue. This results in queuing the same request two times resulting in a list corruption due to double add. Fix this by returning from handle_status irrespective of the return status as in case ep0_queue fails we are suppose to bail out without doing anything. Change-Id: Ibfc99e9112b1173f2a22007a5e18b458904cefca Signed-off-by: Udipto Goswami <ugoswami@codeaurora.org>
Diffstat (limited to 'kernel/fork.c')
0 files changed, 0 insertions, 0 deletions