[SRU][G][PATCH 6/8] UBUNTU: SAUCE: Revert "modules: mark each_symbol_section static"
Ian May
ian.may at canonical.com
Thu Jun 17 20:39:15 UTC 2021
BugLink: https://bugs.launchpad.net/bugs/1932065
This reverts commit e3636033dba208822b9df6f472b359d6baa34007.
Upstream introduced 'module' patches that removed exported symbols
that might cause potential disruption and breakage for customers.
Reverting as SAUCE patches to prevent regressions.
Signed-off-by: Ian May <ian.may at canonical.com>
---
include/linux/module.h | 9 +++++++++
kernel/module.c | 3 ++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/include/linux/module.h b/include/linux/module.h
index b79219eed83c..90bdc362be36 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -590,6 +590,15 @@ struct symsearch {
bool unused;
};
+/*
+ * Walk the exported symbol table
+ *
+ * Must be called with module_mutex held or preemption disabled.
+ */
+bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
+ struct module *owner,
+ void *data), void *data);
+
/* Returns 0 and fills in value, defined and namebuf, or -ERANGE if
symnum out of range. */
int module_get_kallsym(unsigned int symnum, unsigned long *value, char *type,
diff --git a/kernel/module.c b/kernel/module.c
index 80d83e68fcb4..2fbda6d7633f 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -423,7 +423,7 @@ static bool each_symbol_in_section(const struct symsearch *arr,
}
/* Returns true as soon as fn returns true, otherwise false. */
-static bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
+bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
struct module *owner,
void *data),
void *data)
@@ -485,6 +485,7 @@ static bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
}
return false;
}
+EXPORT_SYMBOL_GPL(each_symbol_section);
struct find_symbol_arg {
/* Input */
--
2.25.1
More information about the kernel-team
mailing list