HardenedBSD/sys/dev/usb
Ian Lepore dc91a9715f Fix busdma resource leak on usb device detach.
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
2021-09-28 13:29:10 -06:00
..
controller
gadget
input wmt(4): Adapt to recent KPI changes 2021-09-02 22:35:26 +03:00
misc
net if_cdce: Add support for setting RX filtering 2021-09-01 12:27:14 +02:00
quirk
serial umodem: Add Huawei E3372h-320 device id 2021-08-31 08:44:36 +02:00
storage
template
video
wlan
ufm_ioctl.h
uftdiio.h
uled_ioctl.h
usb_bus.h
usb_busdma.c Fix busdma resource leak on usb device detach. 2021-09-28 13:29:10 -06:00
usb_busdma.h Fix busdma resource leak on usb device detach. 2021-09-28 13:29:10 -06:00
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