This RFC asks whether manual unbind of the apple-admac DMA controller
should be disabled.
apple-admac stores its dma_device and channels in devm-managed memory and
does not implement dma_device.device_release. At registration, the
DMAengine core emits a diagnostic that the driver is not safe to unbind
while in use, and on channel unregister it emits WARN_ONCE if a channel
still has clients. admac_data is released by devres after admac_remove()
returns, so if a client still holds a channel at that point it may
reference the freed dma_chan and admac_data.
As the controller is a fixed SoC resource, the patch removes the standard
driver-core sysfs bind/unbind controls. It also opts the driver out of
CONFIG_DEBUG_TEST_DRIVER_REMOVE.
This RFC does not define behavior for other removal paths, such as
device or DT-overlay removal. Guidance is requested on whether this
restriction is appropriate, or whether the driver should retain manual
bind/unbind support.
This issue was found by an in-house static analysis tool.
Fan Wu (1):
dmaengine: apple-admac: suppress bind/unbind sysfs attributes
drivers/dma/apple-admac.c | 1 +
1 file changed, 1 insertion(+)
--
2.34.1