<div dir="ltr"><div dir="ltr">Hello Greg,<div><br></div><div>Thanks for the patch!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 25 Sept 2021 at 19:17, Greg Kroah-Hartman <<a href="mailto:gregkh@linuxfoundation.org">gregkh@linuxfoundation.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">In order to better track where in the kernel the dma-buf code is used,<br>
put the symbols in the namespace DMA_BUF and modify all users of the<br>
symbols to properly import the namespace to not break the build at the<br>
same time.<br>
<br>
Now the output of modinfo shows the use of these symbols, making it<br>
easier to watch for users over time:<br>
<br>
$ modinfo drivers/misc/fastrpc.ko | grep import<br>
import_ns:      DMA_BUF<br>
<br>
Cc: Sumit Semwal <<a href="mailto:sumit.semwal@linaro.org" target="_blank">sumit.semwal@linaro.org</a>><br>
Cc: "Christian König" <<a href="mailto:christian.koenig@amd.com" target="_blank">christian.koenig@amd.com</a>><br>
Cc: Alex Deucher <<a href="mailto:alexander.deucher@amd.com" target="_blank">alexander.deucher@amd.com</a>><br>
Cc: "Pan, Xinhui" <<a href="mailto:Xinhui.Pan@amd.com" target="_blank">Xinhui.Pan@amd.com</a>><br>
Cc: David Airlie <<a href="mailto:airlied@linux.ie" target="_blank">airlied@linux.ie</a>><br>
Cc: Daniel Vetter <<a href="mailto:daniel@ffwll.ch" target="_blank">daniel@ffwll.ch</a>><br>
Cc: Maarten Lankhorst <<a href="mailto:maarten.lankhorst@linux.intel.com" target="_blank">maarten.lankhorst@linux.intel.com</a>><br>
Cc: Maxime Ripard <<a href="mailto:mripard@kernel.org" target="_blank">mripard@kernel.org</a>><br>
Cc: Thomas Zimmermann <<a href="mailto:tzimmermann@suse.de" target="_blank">tzimmermann@suse.de</a>><br>
Cc: Mauro Carvalho Chehab <<a href="mailto:mchehab@kernel.org" target="_blank">mchehab@kernel.org</a>><br>
Cc: Arnd Bergmann <<a href="mailto:arnd@arndb.de" target="_blank">arnd@arndb.de</a>><br>
Cc: <a href="mailto:dri-devel@lists.freedesktop.org" target="_blank">dri-devel@lists.freedesktop.org</a><br>
Signed-off-by: Greg Kroah-Hartman <<a href="mailto:gregkh@linuxfoundation.org" target="_blank">gregkh@linuxfoundation.org</a>><br></blockquote><div><br></div><div>With the addition of the 2 misses found by Arnd, please feel free to add my</div><div>Acked-by: Sumit Semwal <<a href="mailto:sumit.semwal@linaro.org">sumit.semwal@linaro.org</a>> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
---<br>
<br>
The topic of dma-buf came up in the Maintainer's summit yesterday, and<br>
one comment was to put the symbols in their own module namespace, to<br>
make it easier to notice and track who was using them.  This patch does<br>
so, and finds some "interesting" users of the api already in the tree.<br>
<br>
Only test-built on x86 allmodconfig, don't know what other arches will<br>
pick up, will let 0-day run on it for a bit...<br>
<br>
Comments? </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
<br>
 drivers/dma-buf/dma-buf.c                     | 34 +++++++++----------<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c       |  3 ++<br>
 drivers/gpu/drm/drm_gem_framebuffer_helper.c  |  3 ++<br>
 drivers/gpu/drm/drm_prime.c                   |  3 ++<br>
 drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c   |  3 ++<br>
 drivers/gpu/drm/exynos/exynos_drm_gem.c       |  3 ++<br>
 drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c    |  3 ++<br>
 drivers/gpu/drm/tegra/gem.c                   |  3 ++<br>
 drivers/gpu/drm/vmwgfx/ttm_object.c           |  3 ++<br>
 drivers/infiniband/core/umem_dmabuf.c         |  3 ++<br>
 .../media/common/videobuf2/videobuf2-core.c   |  1 +<br>
 .../common/videobuf2/videobuf2-dma-contig.c   |  1 +<br>
 .../media/common/videobuf2/videobuf2-dma-sg.c |  1 +<br>
 .../common/videobuf2/videobuf2-vmalloc.c      |  1 +<br>
 drivers/misc/fastrpc.c                        |  1 +<br>
 .../staging/media/tegra-vde/dmabuf-cache.c    |  3 ++<br>
 drivers/tee/tee_shm.c                         |  3 ++<br>
 drivers/virtio/virtio_dma_buf.c               |  1 +<br>
 drivers/xen/gntdev-dmabuf.c                   |  3 ++<br>
 samples/vfio-mdev/mbochs.c                    |  1 +<br>
 20 files changed, 60 insertions(+), 17 deletions(-)<br>
<br>
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c<br>
index 63d32261b63f..6c2b5ea828a6 100644<br>
--- a/drivers/dma-buf/dma-buf.c<br>
+++ b/drivers/dma-buf/dma-buf.c<br>
@@ -610,7 +610,7 @@ struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info)<br>
        module_put(exp_info->owner);<br>
        return ERR_PTR(ret);<br>
 }<br>
-EXPORT_SYMBOL_GPL(dma_buf_export);<br>
+EXPORT_SYMBOL_NS_GPL(dma_buf_export, DMA_BUF);<br>
<br>
 /**<br>
  * dma_buf_fd - returns a file descriptor for the given struct dma_buf<br>
@@ -634,7 +634,7 @@ int dma_buf_fd(struct dma_buf *dmabuf, int flags)<br>
<br>
        return fd;<br>
 }<br>
-EXPORT_SYMBOL_GPL(dma_buf_fd);<br>
+EXPORT_SYMBOL_NS_GPL(dma_buf_fd, DMA_BUF);<br>
<br>
 /**<br>
  * dma_buf_get - returns the struct dma_buf related to an fd<br>
@@ -660,7 +660,7 @@ struct dma_buf *dma_buf_get(int fd)<br>
<br>
        return file->private_data;<br>
 }<br>
-EXPORT_SYMBOL_GPL(dma_buf_get);<br>
+EXPORT_SYMBOL_NS_GPL(dma_buf_get, DMA_BUF);<br>
<br>
 /**<br>
  * dma_buf_put - decreases refcount of the buffer<br>
@@ -679,7 +679,7 @@ void dma_buf_put(struct dma_buf *dmabuf)<br>
<br>
        fput(dmabuf->file);<br>
 }<br>
-EXPORT_SYMBOL_GPL(dma_buf_put);<br>
+EXPORT_SYMBOL_NS_GPL(dma_buf_put, DMA_BUF);<br>
<br>
 static void mangle_sg_table(struct sg_table *sg_table)<br>
 {<br>
@@ -810,7 +810,7 @@ dma_buf_dynamic_attach(struct dma_buf *dmabuf, struct device *dev,<br>
        dma_buf_detach(dmabuf, attach);<br>
        return ERR_PTR(ret);<br>
 }<br>
-EXPORT_SYMBOL_GPL(dma_buf_dynamic_attach);<br>
+EXPORT_SYMBOL_NS_GPL(dma_buf_dynamic_attach, DMA_BUF);<br>
<br>
 /**<br>
  * dma_buf_attach - Wrapper for dma_buf_dynamic_attach<br>
@@ -825,7 +825,7 @@ struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,<br>
 {<br>
        return dma_buf_dynamic_attach(dmabuf, dev, NULL, NULL);<br>
 }<br>
-EXPORT_SYMBOL_GPL(dma_buf_attach);<br>
+EXPORT_SYMBOL_NS_GPL(dma_buf_attach, DMA_BUF);<br>
<br>
 static void __unmap_dma_buf(struct dma_buf_attachment *attach,<br>
                            struct sg_table *sg_table,<br>
@@ -871,7 +871,7 @@ void dma_buf_detach(struct dma_buf *dmabuf, struct dma_buf_attachment *attach)<br>
<br>
        kfree(attach);<br>
 }<br>
-EXPORT_SYMBOL_GPL(dma_buf_detach);<br>
+EXPORT_SYMBOL_NS_GPL(dma_buf_detach, DMA_BUF);<br>
<br>
 /**<br>
  * dma_buf_pin - Lock down the DMA-buf<br>
@@ -901,7 +901,7 @@ int dma_buf_pin(struct dma_buf_attachment *attach)<br>
<br>
        return ret;<br>
 }<br>
-EXPORT_SYMBOL_GPL(dma_buf_pin);<br>
+EXPORT_SYMBOL_NS_GPL(dma_buf_pin, DMA_BUF);<br>
<br>
 /**<br>
  * dma_buf_unpin - Unpin a DMA-buf<br>
@@ -922,7 +922,7 @@ void dma_buf_unpin(struct dma_buf_attachment *attach)<br>
        if (dmabuf->ops->unpin)<br>
                dmabuf->ops->unpin(attach);<br>
 }<br>
-EXPORT_SYMBOL_GPL(dma_buf_unpin);<br>
+EXPORT_SYMBOL_NS_GPL(dma_buf_unpin, DMA_BUF);<br>
<br>
 /**<br>
  * dma_buf_map_attachment - Returns the scatterlist table of the attachment;<br>
@@ -1012,7 +1012,7 @@ struct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *attach,<br>
 #endif /* CONFIG_DMA_API_DEBUG */<br>
        return sg_table;<br>
 }<br>
-EXPORT_SYMBOL_GPL(dma_buf_map_attachment);<br>
+EXPORT_SYMBOL_NS_GPL(dma_buf_map_attachment, DMA_BUF);<br>
<br>
 /**<br>
  * dma_buf_unmap_attachment - unmaps and decreases usecount of the buffer;might<br>
@@ -1048,7 +1048,7 @@ void dma_buf_unmap_attachment(struct dma_buf_attachment *attach,<br>
            !IS_ENABLED(CONFIG_DMABUF_MOVE_NOTIFY))<br>
                dma_buf_unpin(attach);<br>
 }<br>
-EXPORT_SYMBOL_GPL(dma_buf_unmap_attachment);<br>
+EXPORT_SYMBOL_NS_GPL(dma_buf_unmap_attachment, DMA_BUF);<br>
<br>
 /**<br>
  * dma_buf_move_notify - notify attachments that DMA-buf is moving<br>
@@ -1068,7 +1068,7 @@ void dma_buf_move_notify(struct dma_buf *dmabuf)<br>
                if (attach->importer_ops)<br>
                        attach->importer_ops->move_notify(attach);<br>
 }<br>
-EXPORT_SYMBOL_GPL(dma_buf_move_notify);<br>
+EXPORT_SYMBOL_NS_GPL(dma_buf_move_notify, DMA_BUF);<br>
<br>
 /**<br>
  * DOC: cpu access<br>
@@ -1212,7 +1212,7 @@ int dma_buf_begin_cpu_access(struct dma_buf *dmabuf,<br>
<br>
        return ret;<br>
 }<br>
-EXPORT_SYMBOL_GPL(dma_buf_begin_cpu_access);<br>
+EXPORT_SYMBOL_NS_GPL(dma_buf_begin_cpu_access, DMA_BUF);<br>
<br>
 /**<br>
  * dma_buf_end_cpu_access - Must be called after accessing a dma_buf from the<br>
@@ -1240,7 +1240,7 @@ int dma_buf_end_cpu_access(struct dma_buf *dmabuf,<br>
<br>
        return ret;<br>
 }<br>
-EXPORT_SYMBOL_GPL(dma_buf_end_cpu_access);<br>
+EXPORT_SYMBOL_NS_GPL(dma_buf_end_cpu_access, DMA_BUF);<br>
<br>
<br>
 /**<br>
@@ -1282,7 +1282,7 @@ int dma_buf_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma,<br>
<br>
        return dmabuf->ops->mmap(dmabuf, vma);<br>
 }<br>
-EXPORT_SYMBOL_GPL(dma_buf_mmap);<br>
+EXPORT_SYMBOL_NS_GPL(dma_buf_mmap, DMA_BUF);<br>
<br>
 /**<br>
  * dma_buf_vmap - Create virtual mapping for the buffer object into kernel<br>
@@ -1336,7 +1336,7 @@ int dma_buf_vmap(struct dma_buf *dmabuf, struct dma_buf_map *map)<br>
        mutex_unlock(&dmabuf->lock);<br>
        return ret;<br>
 }<br>
-EXPORT_SYMBOL_GPL(dma_buf_vmap);<br>
+EXPORT_SYMBOL_NS_GPL(dma_buf_vmap, DMA_BUF);<br>
<br>
 /**<br>
  * dma_buf_vunmap - Unmap a vmap obtained by dma_buf_vmap.<br>
@@ -1360,7 +1360,7 @@ void dma_buf_vunmap(struct dma_buf *dmabuf, struct dma_buf_map *map)<br>
        }<br>
        mutex_unlock(&dmabuf->lock);<br>
 }<br>
-EXPORT_SYMBOL_GPL(dma_buf_vunmap);<br>
+EXPORT_SYMBOL_NS_GPL(dma_buf_vunmap, DMA_BUF);<br>
<br>
 #ifdef CONFIG_DEBUG_FS<br>
 static int dma_buf_debug_show(struct seq_file *s, void *unused)<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c<br>
index 38dade421d46..38e144504649 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c<br>
@@ -41,6 +41,7 @@<br>
 #include <linux/swiotlb.h><br>
 #include <linux/dma-buf.h><br>
 #include <linux/sizes.h><br>
+#include <linux/module.h><br>
<br>
 #include <drm/ttm/ttm_bo_api.h><br>
 #include <drm/ttm/ttm_bo_driver.h><br>
@@ -59,6 +60,8 @@<br>
 #include "amdgpu_res_cursor.h"<br>
 #include "bif/bif_4_1_d.h"<br>
<br>
+MODULE_IMPORT_NS(DMA_BUF);<br>
+<br>
 #define AMDGPU_TTM_VRAM_MAX_DW_READ    (size_t)128<br>
<br>
 static int amdgpu_ttm_backend_bind(struct ttm_device *bdev,<br>
diff --git a/drivers/gpu/drm/drm_gem_framebuffer_helper.c b/drivers/gpu/drm/drm_gem_framebuffer_helper.c<br>
index 3c75d79dbb65..746fd8c73845 100644<br>
--- a/drivers/gpu/drm/drm_gem_framebuffer_helper.c<br>
+++ b/drivers/gpu/drm/drm_gem_framebuffer_helper.c<br>
@@ -6,6 +6,7 @@<br>
  */<br>
<br>
 #include <linux/slab.h><br>
+#include <linux/module.h><br>
<br>
 #include <drm/drm_damage_helper.h><br>
 #include <drm/drm_fb_helper.h><br>
@@ -17,6 +18,8 @@<br>
<br>
 #include "drm_internal.h"<br>
<br>
+MODULE_IMPORT_NS(DMA_BUF);<br>
+<br>
 #define AFBC_HEADER_SIZE               16<br>
 #define AFBC_TH_LAYOUT_ALIGNMENT       8<br>
 #define AFBC_HDR_ALIGN                 64<br>
diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c<br>
index deb23dbec8b5..d8ba95744410 100644<br>
--- a/drivers/gpu/drm/drm_prime.c<br>
+++ b/drivers/gpu/drm/drm_prime.c<br>
@@ -29,6 +29,7 @@<br>
 #include <linux/export.h><br>
 #include <linux/dma-buf.h><br>
 #include <linux/rbtree.h><br>
+#include <linux/module.h><br>
<br>
 #include <drm/drm.h><br>
 #include <drm/drm_drv.h><br>
@@ -39,6 +40,8 @@<br>
<br>
 #include "drm_internal.h"<br>
<br>
+MODULE_IMPORT_NS(DMA_BUF);<br>
+<br>
 /**<br>
  * DOC: overview and lifetime rules<br>
  *<br>
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c<br>
index 6d8bed9c739d..6788ea8490d1 100644<br>
--- a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c<br>
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c<br>
@@ -5,10 +5,13 @@<br>
<br>
 #include <drm/drm_prime.h><br>
 #include <linux/dma-buf.h><br>
+#include <linux/module.h><br>
<br>
 #include "etnaviv_drv.h"<br>
 #include "etnaviv_gem.h"<br>
<br>
+MODULE_IMPORT_NS(DMA_BUF);<br>
+<br>
 static struct lock_class_key etnaviv_prime_lock_class;<br>
<br>
 struct sg_table *etnaviv_gem_prime_get_sg_table(struct drm_gem_object *obj)<br>
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c<br>
index 4396224227d1..0a0c042a3155 100644<br>
--- a/drivers/gpu/drm/exynos/exynos_drm_gem.c<br>
+++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c<br>
@@ -9,6 +9,7 @@<br>
 #include <linux/dma-buf.h><br>
 #include <linux/pfn_t.h><br>
 #include <linux/shmem_fs.h><br>
+#include <linux/module.h><br>
<br>
 #include <drm/drm_prime.h><br>
 #include <drm/drm_vma_manager.h><br>
@@ -17,6 +18,8 @@<br>
 #include "exynos_drm_drv.h"<br>
 #include "exynos_drm_gem.h"<br>
<br>
+MODULE_IMPORT_NS(DMA_BUF);<br>
+<br>
 static int exynos_drm_alloc_buf(struct exynos_drm_gem *exynos_gem, bool kvmap)<br>
 {<br>
        struct drm_device *dev = exynos_gem-><a href="http://base.dev" rel="noreferrer" target="_blank">base.dev</a>;<br>
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c<br>
index afa34111de02..abb854281347 100644<br>
--- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c<br>
+++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c<br>
@@ -7,11 +7,14 @@<br>
 #include <linux/dma-buf.h><br>
 #include <linux/highmem.h><br>
 #include <linux/dma-resv.h><br>
+#include <linux/module.h><br>
<br>
 #include "i915_drv.h"<br>
 #include "i915_gem_object.h"<br>
 #include "i915_scatterlist.h"<br>
<br>
+MODULE_IMPORT_NS(DMA_BUF);<br>
+<br>
 I915_SELFTEST_DECLARE(static bool force_different_devices;)<br>
<br>
 static struct drm_i915_gem_object *dma_buf_to_obj(struct dma_buf *buf)<br>
diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c<br>
index 6ec598f5d5b3..d38fd7e12b57 100644<br>
--- a/drivers/gpu/drm/tegra/gem.c<br>
+++ b/drivers/gpu/drm/tegra/gem.c<br>
@@ -12,6 +12,7 @@<br>
<br>
 #include <linux/dma-buf.h><br>
 #include <linux/iommu.h><br>
+#include <linux/module.h><br>
<br>
 #include <drm/drm_drv.h><br>
 #include <drm/drm_prime.h><br>
@@ -20,6 +21,8 @@<br>
 #include "drm.h"<br>
 #include "gem.h"<br>
<br>
+MODULE_IMPORT_NS(DMA_BUF);<br>
+<br>
 static void tegra_bo_put(struct host1x_bo *bo)<br>
 {<br>
        struct tegra_bo *obj = host1x_to_tegra_bo(bo);<br>
diff --git a/drivers/gpu/drm/vmwgfx/ttm_object.c b/drivers/gpu/drm/vmwgfx/ttm_object.c<br>
index 04789b2bb2a2..899945f54dc7 100644<br>
--- a/drivers/gpu/drm/vmwgfx/ttm_object.c<br>
+++ b/drivers/gpu/drm/vmwgfx/ttm_object.c<br>
@@ -48,8 +48,11 @@<br>
 #include <linux/spinlock.h><br>
 #include <linux/slab.h><br>
 #include <linux/atomic.h><br>
+#include <linux/module.h><br>
 #include "ttm_object.h"<br>
<br>
+MODULE_IMPORT_NS(DMA_BUF);<br>
+<br>
 /**<br>
  * struct ttm_object_file<br>
  *<br>
diff --git a/drivers/infiniband/core/umem_dmabuf.c b/drivers/infiniband/core/umem_dmabuf.c<br>
index e824baf4640d..2d14929543af 100644<br>
--- a/drivers/infiniband/core/umem_dmabuf.c<br>
+++ b/drivers/infiniband/core/umem_dmabuf.c<br>
@@ -6,9 +6,12 @@<br>
 #include <linux/dma-buf.h><br>
 #include <linux/dma-resv.h><br>
 #include <linux/dma-mapping.h><br>
+#include <linux/module.h><br>
<br>
 #include "uverbs.h"<br>
<br>
+MODULE_IMPORT_NS(DMA_BUF);<br>
+<br>
 int ib_umem_dmabuf_map_pages(struct ib_umem_dmabuf *umem_dmabuf)<br>
 {<br>
        struct sg_table *sgt;<br>
diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c<br>
index 508ac295eb06..773c68dcd158 100644<br>
--- a/drivers/media/common/videobuf2/videobuf2-core.c<br>
+++ b/drivers/media/common/videobuf2/videobuf2-core.c<br>
@@ -2978,3 +2978,4 @@ EXPORT_SYMBOL_GPL(vb2_thread_stop);<br>
 MODULE_DESCRIPTION("Media buffer core framework");<br>
 MODULE_AUTHOR("Pawel Osciak <<a href="mailto:pawel@osciak.com" target="_blank">pawel@osciak.com</a>>, Marek Szyprowski");<br>
 MODULE_LICENSE("GPL");<br>
+MODULE_IMPORT_NS(DMA_BUF);<br>
diff --git a/drivers/media/common/videobuf2/videobuf2-dma-contig.c b/drivers/media/common/videobuf2/videobuf2-dma-contig.c<br>
index a7f61ba85440..9a1a9baca2e4 100644<br>
--- a/drivers/media/common/videobuf2/videobuf2-dma-contig.c<br>
+++ b/drivers/media/common/videobuf2/videobuf2-dma-contig.c<br>
@@ -755,3 +755,4 @@ EXPORT_SYMBOL_GPL(vb2_dma_contig_set_max_seg_size);<br>
 MODULE_DESCRIPTION("DMA-contig memory handling routines for videobuf2");<br>
 MODULE_AUTHOR("Pawel Osciak <<a href="mailto:pawel@osciak.com" target="_blank">pawel@osciak.com</a>>");<br>
 MODULE_LICENSE("GPL");<br>
+MODULE_IMPORT_NS(DMA_BUF);<br>
diff --git a/drivers/media/common/videobuf2/videobuf2-dma-sg.c b/drivers/media/common/videobuf2/videobuf2-dma-sg.c<br>
index c5b06a509566..db90ebb8950f 100644<br>
--- a/drivers/media/common/videobuf2/videobuf2-dma-sg.c<br>
+++ b/drivers/media/common/videobuf2/videobuf2-dma-sg.c<br>
@@ -666,3 +666,4 @@ EXPORT_SYMBOL_GPL(vb2_dma_sg_memops);<br>
 MODULE_DESCRIPTION("dma scatter/gather memory handling routines for videobuf2");<br>
 MODULE_AUTHOR("Andrzej Pietrasiewicz");<br>
 MODULE_LICENSE("GPL");<br>
+MODULE_IMPORT_NS(DMA_BUF);<br>
diff --git a/drivers/media/common/videobuf2/videobuf2-vmalloc.c b/drivers/media/common/videobuf2/videobuf2-vmalloc.c<br>
index 83f95258ec8c..fa983897d0e9 100644<br>
--- a/drivers/media/common/videobuf2/videobuf2-vmalloc.c<br>
+++ b/drivers/media/common/videobuf2/videobuf2-vmalloc.c<br>
@@ -444,3 +444,4 @@ EXPORT_SYMBOL_GPL(vb2_vmalloc_memops);<br>
 MODULE_DESCRIPTION("vmalloc memory handling routines for videobuf2");<br>
 MODULE_AUTHOR("Pawel Osciak <<a href="mailto:pawel@osciak.com" target="_blank">pawel@osciak.com</a>>");<br>
 MODULE_LICENSE("GPL");<br>
+MODULE_IMPORT_NS(DMA_BUF);<br>
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c<br>
index beda610e6b30..fa5c067f1c1e 100644<br>
--- a/drivers/misc/fastrpc.c<br>
+++ b/drivers/misc/fastrpc.c<br>
@@ -1763,3 +1763,4 @@ static void fastrpc_exit(void)<br>
 module_exit(fastrpc_exit);<br>
<br>
 MODULE_LICENSE("GPL v2");<br>
+MODULE_IMPORT_NS(DMA_BUF);<br>
diff --git a/drivers/staging/media/tegra-vde/dmabuf-cache.c b/drivers/staging/media/tegra-vde/dmabuf-cache.c<br>
index a93b317885bf..a98d03419b8f 100644<br>
--- a/drivers/staging/media/tegra-vde/dmabuf-cache.c<br>
+++ b/drivers/staging/media/tegra-vde/dmabuf-cache.c<br>
@@ -12,9 +12,12 @@<br>
 #include <linux/sched.h><br>
 #include <linux/slab.h><br>
 #include <linux/workqueue.h><br>
+#include <linux/module.h><br>
<br>
 #include "vde.h"<br>
<br>
+MODULE_IMPORT_NS(DMA_BUF);<br>
+<br>
 struct tegra_vde_cache_entry {<br>
        enum dma_data_direction dma_dir;<br>
        struct dma_buf_attachment *a;<br>
diff --git a/drivers/tee/tee_shm.c b/drivers/tee/tee_shm.c<br>
index 8a9384a64f3e..8a8deb95e918 100644<br>
--- a/drivers/tee/tee_shm.c<br>
+++ b/drivers/tee/tee_shm.c<br>
@@ -10,8 +10,11 @@<br>
 #include <linux/slab.h><br>
 #include <linux/tee_drv.h><br>
 #include <linux/uio.h><br>
+#include <linux/module.h><br>
 #include "tee_private.h"<br>
<br>
+MODULE_IMPORT_NS(DMA_BUF);<br>
+<br>
 static void release_registered_pages(struct tee_shm *shm)<br>
 {<br>
        if (shm->pages) {<br>
diff --git a/drivers/virtio/virtio_dma_buf.c b/drivers/virtio/virtio_dma_buf.c<br>
index 5127a2f0c986..2521a75009c3 100644<br>
--- a/drivers/virtio/virtio_dma_buf.c<br>
+++ b/drivers/virtio/virtio_dma_buf.c<br>
@@ -86,3 +86,4 @@ int virtio_dma_buf_get_uuid(struct dma_buf *dma_buf,<br>
 EXPORT_SYMBOL(virtio_dma_buf_get_uuid);<br>
<br>
 MODULE_LICENSE("GPL");<br>
+MODULE_IMPORT_NS(DMA_BUF);<br>
diff --git a/drivers/xen/gntdev-dmabuf.c b/drivers/xen/gntdev-dmabuf.c<br>
index 4c13cbc99896..12e380db7f55 100644<br>
--- a/drivers/xen/gntdev-dmabuf.c<br>
+++ b/drivers/xen/gntdev-dmabuf.c<br>
@@ -14,6 +14,7 @@<br>
 #include <linux/slab.h><br>
 #include <linux/types.h><br>
 #include <linux/uaccess.h><br>
+#include <linux/module.h><br>
<br>
 #include <xen/xen.h><br>
 #include <xen/grant_table.h><br>
@@ -21,6 +22,8 @@<br>
 #include "gntdev-common.h"<br>
 #include "gntdev-dmabuf.h"<br>
<br>
+MODULE_IMPORT_NS(DMA_BUF);<br>
+<br>
 #ifndef GRANT_INVALID_REF<br>
 /*<br>
  * Note on usage of grant reference 0 as invalid grant reference:<br>
diff --git a/samples/vfio-mdev/mbochs.c b/samples/vfio-mdev/mbochs.c<br>
index c313ab4d1f4e..a83be6cd162f 100644<br>
--- a/samples/vfio-mdev/mbochs.c<br>
+++ b/samples/vfio-mdev/mbochs.c<br>
@@ -1493,5 +1493,6 @@ static void __exit mbochs_dev_exit(void)<br>
        mbochs_class = NULL;<br>
 }<br>
<br>
+MODULE_IMPORT_NS(DMA_BUF);<br>
 module_init(mbochs_dev_init)<br>
 module_exit(mbochs_dev_exit)<br>
-- <br>
2.33.0<br>
<br>
</blockquote></div><br clear="all"><div>Best,</div><div>Sumit.</div></div>