Loading kernel/module.c +2 −13 Original line number Diff line number Diff line Loading @@ -2289,26 +2289,15 @@ static void free_module(struct module *mod) void *__symbol_get(const char *symbol) { struct module *owner; enum mod_license license; const struct kernel_symbol *sym; preempt_disable(); sym = find_symbol(symbol, &owner, NULL, &license, true, true); if (!sym) goto fail; if (license != GPL_ONLY) { pr_warn("failing symbol_get of non-GPLONLY symbol %s.\n", symbol); goto fail; } if (strong_try_module_get(owner)) sym = find_symbol(symbol, &owner, NULL, NULL, true, true); if (sym && strong_try_module_get(owner)) sym = NULL; preempt_enable(); return sym ? (void *)kernel_symbol_value(sym) : NULL; fail: preempt_enable(); return NULL; } EXPORT_SYMBOL_GPL(__symbol_get); Loading Loading
kernel/module.c +2 −13 Original line number Diff line number Diff line Loading @@ -2289,26 +2289,15 @@ static void free_module(struct module *mod) void *__symbol_get(const char *symbol) { struct module *owner; enum mod_license license; const struct kernel_symbol *sym; preempt_disable(); sym = find_symbol(symbol, &owner, NULL, &license, true, true); if (!sym) goto fail; if (license != GPL_ONLY) { pr_warn("failing symbol_get of non-GPLONLY symbol %s.\n", symbol); goto fail; } if (strong_try_module_get(owner)) sym = find_symbol(symbol, &owner, NULL, NULL, true, true); if (sym && strong_try_module_get(owner)) sym = NULL; preempt_enable(); return sym ? (void *)kernel_symbol_value(sym) : NULL; fail: preempt_enable(); return NULL; } EXPORT_SYMBOL_GPL(__symbol_get); Loading