Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9f71ba69 authored by Udipto Goswami's avatar Udipto Goswami Committed by Treehugger Robot
Browse files

UPSTREAM: usb: gadget: f_fs: Ensure ep0req is dequeued before free_request



As per the documentation, function usb_ep_free_request guarantees
the request will not be queued or no longer be re-queued (or
otherwise used). However, with the current implementation it
doesn't make sure that the request in ep0 isn't reused.

Fix this by dequeuing the ep0req on functionfs_unbind before
freeing the request to align with the definition.

Fixes: ddf8abd2 ("USB: f_fs: the FunctionFS driver")
Signed-off-by: default avatarUdipto Goswami <quic_ugoswami@quicinc.com>
Tested-by: default avatarKrishna Kurapati <quic_kriskura@quicinc.com>
Link: https://lore.kernel.org/r/20221215052906.8993-3-quic_ugoswami@quicinc.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 265837309
Bug: 266213784
(cherry picked from commit ce405d561b020e5a46340eb5146805a625dcacee https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/

 usb-linus)
Change-Id: Idbc5f13cedac59cbc893d229383b01662f4e4a03
Signed-off-by: default avatarPrashanth K <quic_prashk@quicinc.com>
Signed-off-by: default avatarLee Jones <joneslee@google.com>
parent 62b8ef04
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment