diff options
Diffstat (limited to 'target/linux/generic/hack-5.4/204-module_strip.patch')
-rw-r--r-- | target/linux/generic/hack-5.4/204-module_strip.patch | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/target/linux/generic/hack-5.4/204-module_strip.patch b/target/linux/generic/hack-5.4/204-module_strip.patch index c6420739c0..2c3de812a3 100644 --- a/target/linux/generic/hack-5.4/204-module_strip.patch +++ b/target/linux/generic/hack-5.4/204-module_strip.patch @@ -112,6 +112,22 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> config MODULES_TREE_LOOKUP --- a/kernel/module.c +++ b/kernel/module.c +@@ -1285,6 +1285,7 @@ static struct module_attribute *modinfo_ + + static const char vermagic[] = VERMAGIC_STRING; + ++#if defined(CONFIG_MODVERSIONS) || !defined(CONFIG_MODULE_STRIPPED) + static int try_to_force_load(struct module *mod, const char *reason) + { + #ifdef CONFIG_MODULE_FORCE_LOAD +@@ -1296,6 +1297,7 @@ static int try_to_force_load(struct modu + return -ENOEXEC; + #endif + } ++#endif + + #ifdef CONFIG_MODVERSIONS + @@ -3256,9 +3256,11 @@ static int setup_load_info(struct load_i static int check_modinfo(struct module *mod, struct load_info *info, int flags) |