[PATCH v2 00/13] dmaengine: ste_dma40: Fix probe and allocation bugs
Linus Walleij <[email protected]>
| Newsgroups | org.kernel.vger.phone-devel,org.kernel.vger.dmaengine |
|---|---|
| Message-ID | <[email protected]> |
This series fixes thirteen pre-existing DMA40 bugs found while reviewing the Ux500 LCLA SRAM power-domain conversion. The fixes cover failed hardware-start cleanup, IRQ handling while runtime suspended, hardware initialization before DMAengine registration, DMAengine registration unwinding, LCLA allocation and probe error unwinding, runtime PM and IRQ registration, device tree memcpy channel parsing and validation, validation of logical channel and event-group indexes derived from dev_type before writing into lookup_log_chans or touching phy_res, and duplicate DMAengine debugfs names when several DMAengine devices share the same parent device. The method taken is: whenever Sashiko complains: fix the bug it complains about if possible. This has been boot tested on the Samsung Skomer device. Signed-off-by: Linus Walleij <[email protected]> --- Changes in v2: - In patch 1, complete the failed-start descriptor through the normal tasklet path and drop the runtime PM reference instead of freeing the submitted descriptor directly. - Add an IRQ fix to avoid register access when DMA40 is runtime suspended. - Add a probe ordering fix so DMA40 hardware is initialized before DMAengine devices are registered. - Add a probe unwind fix so DMAengine registrations are released before freeing IRQ and LCLA resources. - Add an LCLA allocation fix so __get_free_pages() and free_pages() use an allocation order instead of a raw page count. - Add a probe unwind fix so ESRAM LCLA mappings are not released with free_pages(). - Add a device tree parsing fix so memcpy-channels cannot overflow the memcpy channel array. - Add a dev_type bounds fix so derived event groups cannot overflow phy_res or the priority/realtime register window. - Add validation for fallback memcpy configurations so memcpy-channels entries cannot bypass the dev_type bounds checks. - Add a DMAengine debugfs naming fix so drivers registering several DMAengine devices for one parent device do not trigger duplicate-name warnings. - Link to v1: https://lore.kernel.org/r/[email protected] --- Linus Walleij (13): dmaengine: ste_dma40: Fix failed start cleanup dmaengine: ste_dma40: Check runtime PM in IRQ dmaengine: ste_dma40: Init hardware before registration dmaengine: ste_dma40: Fix DMA registration unwind dmaengine: ste_dma40: Fix LCLA allocation order dmaengine: ste_dma40: Fix probe LCLA free dmaengine: ste_dma40: Fix probe runtime PM disable dmaengine: ste_dma40: Fix probe IRQ leak dmaengine: ste_dma40: Fix memcpy channel parsing dmaengine: ste_dma40: Fix logical channel bounds check dmaengine: ste_dma40: Fix event group bounds dmaengine: ste_dma40: Validate memcpy configuration dmaengine: Use unique debugfs names drivers/dma/dmaengine.c | 21 +++++++- drivers/dma/ste_dma40.c | 126 ++++++++++++++++++++++++++++++++++++------------ 2 files changed, 113 insertions(+), 34 deletions(-) --- base-commit: 0d995da5fb97e8c312834575604d4423eb6225b7 change-id: 20260820-dma40-fixes-b99af66002bf Best regards, -- Linus Walleij <[email protected]>