[SRU][B][PATCH 6/8] UBUNTU: SAUCE: Revert "modules: mark each_symbol_section static"
Ian May
ian.may at canonical.com
Thu Jun 17 20:22:23 UTC 2021
BugLink: https://bugs.launchpad.net/bugs/1932065
This reverts commit d050d0649cea52a709c591af5d951a2a90c7ea12.
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 605ced6af2f8..44c7db9d7ac0 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -530,6 +530,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 969e47cb956d..b23045514742 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -435,7 +435,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)
@@ -496,6 +496,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