summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/init/main.c b/init/main.c
index fa9b2bdde183..bc0f9e0bcf22 100644
--- a/init/main.c
+++ b/init/main.c
@@ -706,21 +706,20 @@ static int __init initcall_blacklist(char *str)
static bool __init_or_module initcall_blacklisted(initcall_t fn)
{
struct blacklist_entry *entry;
- char *fn_name;
+ char fn_name[KSYM_SYMBOL_LEN];
- fn_name = kasprintf(GFP_KERNEL, "%pf", fn);
- if (!fn_name)
+ if (list_empty(&blacklisted_initcalls))
return false;
+ sprint_symbol_no_offset(fn_name, (unsigned long)fn);
+
list_for_each_entry(entry, &blacklisted_initcalls, next) {
if (!strcmp(fn_name, entry->buf)) {
pr_debug("initcall %s blacklisted\n", fn_name);
- kfree(fn_name);
return true;
}
}
- kfree(fn_name);
return false;
}
#else