mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-25 18:12:57 +01:00
dc91a9715f
When a usb device is detached, usb_pc_dmamap_destroy() called bus_dmamap_destroy() while the map was still loaded. That's harmless on x86 architectures, but on all other platforms it causes bus_dmamap_destroy() to return EBUSY and leak away any memory resources (including bounce buffers) associated with the mapping, as well as any allocated map structure itself. This change introduces a new is_loaded flag to the usb_page_cache struct to track whether a map is loaded or not. If the map is loaded, bus_dmamap_unload() is called before bus_dmamap_destroy() to avoid leaking away resources. MFC after: 7 days Differential Revision: https://reviews.freebsd.org/D32208 |
||
---|---|---|
.. | ||
controller | ||
gadget | ||
input | ||
misc | ||
net | ||
quirk | ||
serial | ||
storage | ||
template | ||
video | ||
wlan | ||
ufm_ioctl.h | ||
uftdiio.h | ||
uled_ioctl.h | ||
usb_bus.h | ||
usb_busdma.c | ||
usb_busdma.h | ||
usb_cdc.h | ||
usb_controller.h | ||
usb_core.c | ||
usb_core.h | ||
usb_debug.c | ||
usb_debug.h | ||
usb_dev.c | ||
usb_dev.h | ||
usb_device.c | ||
usb_device.h | ||
usb_dynamic.c | ||
usb_dynamic.h | ||
usb_endian.h | ||
usb_error.c | ||
usb_fdt_support.c | ||
usb_fdt_support.h | ||
usb_freebsd_loader.h | ||
usb_freebsd.h | ||
usb_generic.c | ||
usb_generic.h | ||
usb_handle_request.c | ||
usb_hid.c | ||
usb_hub_acpi.c | ||
usb_hub_private.h | ||
usb_hub.c | ||
usb_hub.h | ||
usb_if.m | ||
usb_ioctl.h | ||
usb_lookup.c | ||
usb_mbuf.c | ||
usb_mbuf.h | ||
usb_msctest.c | ||
usb_msctest.h | ||
usb_parse.c | ||
usb_pci.h | ||
usb_pf.c | ||
usb_pf.h | ||
usb_process.c | ||
usb_process.h | ||
usb_request.c | ||
usb_request.h | ||
usb_transfer.c | ||
usb_transfer.h | ||
usb_util.c | ||
usb_util.h | ||
usb.h | ||
usbdevs | ||
usbdi_util.h | ||
usbdi.h | ||
usbhid.h |