Skip to content

dma-debug: prevent early callers from crashing

Florian Fainelli lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2dma-debug: introduce dma_debug_disabledlib/dma-debug.c+21 -160 replies
2/2dma-debug: prevent early callers from crashinglib/dma-debug.c+10 -21 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] dma-debug: prevent early callers from crashing

Hi Dan,

This patch series addresses a problem seen on the brcmstb ARM platform where dma_debug_init is called by the ARM kernel at fs_initcall time, while some of our callers using the DMA-API were running at arch_initcall time.

Unless CONFIG_DMA_API_DEBUG is set, this is completely silent.

First patch introduces a helper function to check whether a DMA-API debug implementation is allowed to proceed, while the second patch introduces an initialization flag and uses the helper. A complete writeup of how and why this crashes is provided in patch 2.

Thank you!

Florian Fainelli (2):
dma-debug: introduce dma_debug_disabled
dma-debug: prevent early callers from crashing

 lib/dma-debug.c | 43 ++++++++++++++++++++++++++++---------------
 1 file changed, 28 insertions(+), 15 deletions(-)
Signature · 1 line
1.9.1