]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
UBUNTU: SAUCE: Revert "modules: mark ref_module static"
authorIan May <ian.may@canonical.com>
Tue, 15 Jun 2021 22:04:00 +0000 (00:04 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 16 Jun 2021 08:31:45 +0000 (10:31 +0200)
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>
Acked-by: Kamal Mostafa <kamal@canonical.com>
Acked-by: Khaled Elmously <khalid.elmously@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
include/linux/module.h
kernel/module.c

index 92b2058b2f031d541547d99d2c9761c0728775e1..6d20895e7739198609531a27814a6309b613dda6 100644 (file)
@@ -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)                       \
index eeb06b206e6b463c554140b27d7f3fa8e249883c..c60559b5bf101b9fca19619e4ceadc110cc62122 100644 (file)
@@ -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)
 {