Skip to contentSkip to conversation

RDMA/core: Fix missing MODULE_IMPORT_NS in ib_uverbs module

PATCH In review Cheng Xu 2 participants 2 messages Mar 3 – Mar 4 InfiniBand

lore
Share & tools
lore

Cheng Xu

author
#0 lore raw

PATCH 1/1 RDMA/core: Fix missing MODULE_IMPORT_NS in ib_uverbs module

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")
---
 drivers/infiniband/core/uverbs_std_types_dmabuf.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/infiniband/core/uverbs_std_types_dmabuf.c +2 -0
index dfdfcd1d1a44..4a7f8b6f9dc8 100644
@@ -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)
 {
Signature · 1 line
2.31.1
#1 lore raw
Quoted 15 lines · Cheng Xu

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

Quoted 7 lines

Add the missing MODULE_IMPORT_NS to fix it.

Fixes 0ac6f4056c4a ("RDMA/uverbs: Add DMABUF object type and operations")
---
 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/[email protected]

Thanks