@@ -636,6 +636,7 @@ static inline void __module_get(struct module *module)
#define symbol_put_addr(p) do { } while (0)
#endif /* CONFIG_MODULE_UNLOAD */
+int ref_module(struct module *a, struct module *b);
/* This is a #define so the string doesn't get put in every .o file */
#define module_name(mod) \
@@ -867,7 +867,7 @@ static int add_module_usage(struct module *a, struct module *b)
}
/* Module a uses b: caller needs module_mutex() */
-static int ref_module(struct module *a, struct module *b)
+int ref_module(struct module *a, struct module *b)
{
int err;
@@ -886,6 +886,7 @@ static int ref_module(struct module *a, struct module *b)
}
return 0;
}
+EXPORT_SYMBOL_GPL(ref_module);
/* Clear the unload stuff of the module. */
static void module_unload_free(struct module *mod)
@@ -1166,10 +1167,11 @@ static inline void module_unload_free(struct module *mod)
{
}
-static int ref_module(struct module *a, struct module *b)
+int ref_module(struct module *a, struct module *b)
{
return strong_try_module_get(b);
}
+EXPORT_SYMBOL_GPL(ref_module);
static inline int module_unload_init(struct module *mod)
{
BugLink: https://bugs.launchpad.net/bugs/1932065 This reverts commit adec698db991c715cf457782ce36ca1efb689b37. 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@canonical.com> --- include/linux/module.h | 1 + kernel/module.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-)