aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdns3-trace.h
diff options
context:
space:
mode:
authorAvichal Rakesh <[email protected]>2023-11-08 16:41:02 -0800
committerGreg Kroah-Hartman <[email protected]>2023-11-23 12:32:44 +0000
commitaeb686a98a9e9743c4c0338957e59643a2708146 (patch)
treea4c0f06ba9f46557c9c9e2d1ff6f84060e6efd2f /drivers/usb/cdns3/cdns3-trace.h
parent991544dc579b636e69defa3eec486fd6f6191e59 (diff)
usb: gadget: uvc: Allocate uvc_requests one at a time
Currently, the uvc gadget driver allocates all uvc_requests as one array and deallocates them all when the video stream stops. This includes de-allocating all the usb_requests associated with those uvc_requests. This can lead to use-after-free issues if any of those de-allocated usb_requests were still owned by the usb controller. This patch is 1 of 2 patches addressing the use-after-free issue. Instead of bulk allocating all uvc_requests as an array, this patch allocates uvc_requests one at a time, which should allows for similar granularity when deallocating the uvc_requests. This patch has no functional changes other than allocating each uvc_request separately, and similarly freeing each of them separately. Link: https://lore.kernel.org/[email protected] Reviewed-by: Daniel Scally <[email protected]> Reviewed-by: Michael Grzeschik <[email protected]> Suggested-by: Michael Grzeschik <[email protected]> Tested-by: Michael Grzeschik <[email protected]> Signed-off-by: Avichal Rakesh <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-trace.h')
0 files changed, 0 insertions, 0 deletions