Re: [PATCH v5 2/7] dmaengine: add a bus for DMA channel devices

From: Peng Fan

Date: Wed Nov 11 2026 - 22:11:32 EST


On Wed, Nov 11, 2026 at 08:16:39PM -0600, Frank Li wrote:
...
>>
>> >
>> >Not sure how other dmaengine support it before? Maybe already block for
>> >long time.
>>
>> In drivers/dma/tegra186-gpc-dma.c:
>> 1543 if (use_iommu_map) {
>> 1544 chdev->bus = pdev->dev.bus;
>>
>> I used similar method, but Sashiko spotted issue for v1 [1], we have to
>> add a new bus to handle it.
>>
>> "
>> Does this illegally modify the bus type of an already-registered device?
>>
>> This is executed after dmaenginem_async_device_register() has already called
>> device_add(). Since bus_add_device() is never executed, won't device_del()
>> invoke bus_remove_device() during driver unbinding or removal, causing a fatal
>> reference count underflow and use-after-free on the global platform_bus_type
>> subsystem?
>> "
>>
>> [1] https://lore.kernel.org/dmaengine/20260916160608.099201F000FF@xxxxxxxxxxxxxxx/
>
>Can you add it to commit message to know why need add new bus type

ok. Update in V6.

Thanks
Peng

>
>Frank
>
>>
>> Thanks
>> Peng
>>
>> >
>> >Frank
>> >
>> >> +#endif
>> >> +
>> >> /**
>> >> * enum dma_slave_buswidth - defines bus width of the DMA slave
>> >> * device, source or target buses
>> >>
>> >> --
>> >> 2.34.1
>> >>
>> >
>
>