Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Medium] Using DEBUG_KERNEL as a default trigger for DMABUF_DEBUG 
unintentionally enables performance-degrading debug checks on production 
kernels.
--

commit 35e36d45a9285f1874efd2a5212588eb662aa118
Author: Karl Mehltretter <[email protected]>

dma-buf: Make DMABUF_DEBUG default to y on DEBUG_KERNEL kernels

This commit replaces the non-existent DEBUG Kconfig symbol with DEBUG_KERNEL
to ensure DMA-BUF debug checks are enabled on debug kernels.

> diff --git a/drivers/dma-buf/Kconfig b/drivers/dma-buf/Kconfig
> index 7efc0f0d07126..e4f078a326a41 100644
> --- a/drivers/dma-buf/Kconfig
> +++ b/drivers/dma-buf/Kconfig
> @@ -43,7 +43,7 @@ config UDMABUF
>  config DMABUF_DEBUG
>       bool "DMA-BUF debug checks"
>       depends on DMA_SHARED_BUFFER
> -     default y if DEBUG
> +     default y if DEBUG_KERNEL

[Severity: Medium]
Will tying this default to DEBUG_KERNEL unintentionally cause a performance
regression on production kernels?

Because DEBUG_KERNEL is a top-level menu toggle enabled in virtually all
production configurations and standard distributions, DMABUF_DEBUG will now
be universally enabled by default.

This introduces unnecessary dynamic heap allocations and scatterlist copying
in dma_buf_map_attachment() via dma_buf_wrap_sg_table() during frequent map
and unmap operations.

Could this be tied to a more specific debugging option instead to prevent
this regression on production systems?

>       help
>         This option enables additional checks for DMA-BUF importers and
>         exporters. Specifically it validates that importers do not peek at the

-- 
Sashiko AI review · 
https://sashiko.dev/#/patchset/[email protected]?part=1

Reply via email to