[SRU][F][PATCH 7/8] UBUNTU: SAUCE: Revert "modules: mark find_symbol static"

Ian May ian.may at canonical.com
Tue Jun 15 22:04:07 UTC 2021


BugLink: https://bugs.launchpad.net/bugs/1932065

This reverts commit 0a71a93c21966d898b64f747d0361b30720366c3.

Upstream introduced 'module' patches that removed exported symbols
that might cause potential disruption and breakage for customers.

Temporarily reverting as SAUCE patches to allow customers time to
make necessary changes to support patch changes.

Signed-off-by: Ian May <ian.may at canonical.com>
---
 include/linux/module.h | 11 +++++++++++
 kernel/module.c        |  3 ++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/include/linux/module.h b/include/linux/module.h
index d9d393ba17be..92b2058b2f03 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -569,6 +569,17 @@ struct symsearch {
 	bool unused;
 };
 
+/*
+ * Search for an exported symbol by name.
+ *
+ * Must be called with module_mutex held or preemption disabled.
+ */
+const struct kernel_symbol *find_symbol(const char *name,
+					struct module **owner,
+					const s32 **crc,
+					bool gplok,
+					bool warn);
+
 /*
  * Walk the exported symbol table
  *
diff --git a/kernel/module.c b/kernel/module.c
index 023fec24be52..eeb06b206e6b 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -583,7 +583,7 @@ static bool find_exported_symbol_in_section(const struct symsearch *syms,
 
 /* Find an exported symbol and return it, along with, (optional) crc and
  * (optional) module which owns it.  Needs preempt disabled or module_mutex. */
-static const struct kernel_symbol *find_symbol(const char *name,
+const struct kernel_symbol *find_symbol(const char *name,
 					struct module **owner,
 					const s32 **crc,
 					bool gplok,
@@ -606,6 +606,7 @@ static const struct kernel_symbol *find_symbol(const char *name,
 	pr_debug("Failed to find symbol %s\n", name);
 	return NULL;
 }
+EXPORT_SYMBOL_GPL(find_symbol);
 
 /*
  * Search for module by name: must hold module_mutex (or preempt disabled
-- 
2.25.1




More information about the kernel-team mailing list