]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/blobdiff - init/main.c
init: allow blacklisting of module_init functions
[mirror_ubuntu-eoan-kernel.git] / init / main.c
index e7345dcaaf05144e09c424de2335e0f12ee690db..a8a58e2794a50469d465fad1a6939a4b68ec1114 100644 (file)
@@ -716,6 +716,12 @@ static bool __init_or_module initcall_blacklisted(initcall_t fn)
        addr = (unsigned long) dereference_function_descriptor(fn);
        sprint_symbol_no_offset(fn_name, addr);
 
+       /*
+        * fn will be "function_name [module_name]" where [module_name] is not
+        * displayed for built-in init functions.  Strip off the [module_name].
+        */
+       strreplace(fn_name, ' ', '\0');
+
        list_for_each_entry(entry, &blacklisted_initcalls, next) {
                if (!strcmp(fn_name, entry->buf)) {
                        pr_debug("initcall %s blacklisted\n", fn_name);