[PATCH 03/13] module: unexport find_module and module_mutex

From: Christoph Hellwig
Date: Tue Feb 02 2021 - 07:15:01 EST


find_module is not used by modular code any more, and random driver code
has no business calling it to start with.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Reviewed-by: Miroslav Benes <mbenes@xxxxxxx>
---
kernel/module.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/kernel/module.c b/kernel/module.c
index 4bf30e4b3eaaa1..981302f616b411 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -88,7 +88,6 @@
* (delete and add uses RCU list operations).
*/
DEFINE_MUTEX(module_mutex);
-EXPORT_SYMBOL_GPL(module_mutex);
static LIST_HEAD(modules);

/* Work queue for freeing init sections in success case */
@@ -672,7 +671,6 @@ struct module *find_module(const char *name)
module_assert_mutex();
return find_module_all(name, strlen(name), false);
}
-EXPORT_SYMBOL_GPL(find_module);

#ifdef CONFIG_SMP

--
2.29.2