public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-next] RDMA/core: Fix missing MODULE_IMPORT_NS in ib_uverbs module
@ 2026-03-03  3:19 Cheng Xu
  2026-03-04 10:42 ` Leon Romanovsky
  0 siblings, 1 reply; 2+ messages in thread
From: Cheng Xu @ 2026-03-03  3:19 UTC (permalink / raw)
  To: jgg, leon; +Cc: linux-rdma, KaiShen

Compiling failed with the following messages:

<...>
  CC [M]  drivers/infiniband/core/uverbs_std_types_dmabuf.o
  LD [M]  drivers/infiniband/core/ib_uverbs.o
  MODPOST Module.symvers
ERROR: modpost: module ib_uverbs uses symbol dma_buf_move_notify from namespace DMA_BUF, but does not import it.
ERROR: modpost: module ib_uverbs uses symbol dma_buf_phys_vec_to_sgt from namespace DMA_BUF, but does not import it.
ERROR: modpost: module ib_uverbs uses symbol dma_buf_export from namespace DMA_BUF, but does not import it.
ERROR: modpost: module ib_uverbs uses symbol dma_buf_free_sgt from namespace DMA_BUF, but does not import it.
ERROR: modpost: module ib_uverbs uses symbol dma_buf_put from namespace DMA_BUF, but does not import it.
make[2]: *** [scripts/Makefile.modpost:147: Module.symvers] Error 1
make[1]: *** [/opt/linux/Makefile:2051: modpost] Error 2
make: *** [Makefile:248: __sub-make] Error 2

Add the missing MODULE_IMPORT_NS to fix it.

Fixes: 0ac6f4056c4a ("RDMA/uverbs: Add DMABUF object type and operations")
Signed-off-by: Cheng Xu <chengyou@linux.alibaba.com>
---
 drivers/infiniband/core/uverbs_std_types_dmabuf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/infiniband/core/uverbs_std_types_dmabuf.c b/drivers/infiniband/core/uverbs_std_types_dmabuf.c
index dfdfcd1d1a44..4a7f8b6f9dc8 100644
--- a/drivers/infiniband/core/uverbs_std_types_dmabuf.c
+++ b/drivers/infiniband/core/uverbs_std_types_dmabuf.c
@@ -10,6 +10,8 @@
 #include "rdma_core.h"
 #include "uverbs.h"
 
+MODULE_IMPORT_NS("DMA_BUF");
+
 static int uverbs_dmabuf_attach(struct dma_buf *dmabuf,
 				struct dma_buf_attachment *attachment)
 {
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH for-next] RDMA/core: Fix missing MODULE_IMPORT_NS in ib_uverbs module
  2026-03-03  3:19 [PATCH for-next] RDMA/core: Fix missing MODULE_IMPORT_NS in ib_uverbs module Cheng Xu
@ 2026-03-04 10:42 ` Leon Romanovsky
  0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2026-03-04 10:42 UTC (permalink / raw)
  To: Cheng Xu; +Cc: jgg, linux-rdma, KaiShen

On Tue, Mar 03, 2026 at 11:19:10AM +0800, Cheng Xu wrote:
> Compiling failed with the following messages:
> 
> <...>
>   CC [M]  drivers/infiniband/core/uverbs_std_types_dmabuf.o
>   LD [M]  drivers/infiniband/core/ib_uverbs.o
>   MODPOST Module.symvers
> ERROR: modpost: module ib_uverbs uses symbol dma_buf_move_notify from namespace DMA_BUF, but does not import it.
> ERROR: modpost: module ib_uverbs uses symbol dma_buf_phys_vec_to_sgt from namespace DMA_BUF, but does not import it.
> ERROR: modpost: module ib_uverbs uses symbol dma_buf_export from namespace DMA_BUF, but does not import it.
> ERROR: modpost: module ib_uverbs uses symbol dma_buf_free_sgt from namespace DMA_BUF, but does not import it.
> ERROR: modpost: module ib_uverbs uses symbol dma_buf_put from namespace DMA_BUF, but does not import it.
> make[2]: *** [scripts/Makefile.modpost:147: Module.symvers] Error 1
> make[1]: *** [/opt/linux/Makefile:2051: modpost] Error 2
> make: *** [Makefile:248: __sub-make] Error 2
> 
> Add the missing MODULE_IMPORT_NS to fix it.
> 
> Fixes: 0ac6f4056c4a ("RDMA/uverbs: Add DMABUF object type and operations")
> Signed-off-by: Cheng Xu <chengyou@linux.alibaba.com>
> ---
>  drivers/infiniband/core/uverbs_std_types_dmabuf.c | 2 ++
>  1 file changed, 2 insertions(+)

The same patch was already applied to Linus's master.
7c2889af8233 ("RDMA/uverbs: Import DMA-BUF module in uverbs_std_types_dmabuf file")
https://patch.msgid.link/20260225-fix-uverbs-compilation-v1-1-acf7b3d0f9fa@nvidia.com

Thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-04 10:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-03  3:19 [PATCH for-next] RDMA/core: Fix missing MODULE_IMPORT_NS in ib_uverbs module Cheng Xu
2026-03-04 10:42 ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox