usb: gadget: Prevent use after free in qdss connect & close
Dwc3 gadget controller driver can still access usb_request
after dequeue() returns due to async cancellation.
Hence usb_request shouldn't be freed after calling
usb_ep_dequeue() which can otherwise cause use after free.
Fix this by allocating & de-allocating from bind and unbind
instead of data_connection & close.
Change-Id: I8155ecbebcf762fc87c17841c72c53c6dca2e4a9
Signed-off-by:
Udipto Goswami <ugoswami@codeaurora.org>
Loading
Please register or sign in to comment