Re: [PATCH] io_uring/rsrc: fix build without DMA_SHARED_BUFFER
From: Jens Axboe
Date: Tue Oct 13 2026 - 16:05:33 EST
On Tue, 13 Oct 2026 08:24:17 -0400, Sasha Levin wrote:
> io_register_dmabuf_desc() calls io_register_dmabuf() unconditionally, but
> io_uring/dma-buf.o is only built with CONFIG_DMA_SHARED_BUFFER enabled.
> This causes an undefined reference to io_register_dmabuf() when linking
> kernels with CONFIG_IO_URING=y and CONFIG_DMA_SHARED_BUFFER=n, as reported
> by KernelCI for i386 allnoconfig and ARC haps_hs_smp_defconfig builds.
>
> Move the configuration check from io_register_dmabuf() to
> io_register_dmabuf_desc(), before allocating the resource node and mapped
> buffer. This lets the compiler eliminate the call when DMA-BUF support
> is disabled and rejects DMA-BUF registration with -EOPNOTSUPP. The check
> in io_register_dmabuf() cannot handle this configuration because its
> object file is not built.
>
> [...]
Applied, thanks!
[1/1] io_uring/rsrc: fix build without DMA_SHARED_BUFFER
commit: 1127f017f33d9e9dbbadd1c230a0640f9a326055
Best regards,
--
Jens Axboe