init/main.c: fix initcall_blacklisted on ia64, ppc64 and parisc64
authorRasmus Villemoes <[email protected]>
Fri, 24 Jun 2016 21:50:30 +0000 (14:50 -0700)
committerLinus Torvalds <[email protected]>
Sat, 25 Jun 2016 00:23:52 +0000 (17:23 -0700)
When I replaced kasprintf("%pf") with a direct call to
sprint_symbol_no_offset I must have broken the initcall blacklisting
feature on the arches where dereference_function_descriptor() is
non-trivial.

Fixes: c8cdd2be213f (init/main.c: simplify initcall_blacklisted())
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Rasmus Villemoes <[email protected]>
Cc: Yang Shi <[email protected]>
Cc: Prarit Bhargava <[email protected]>
Cc: Petr Mladek <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
init/main.c

index 4c17fda5c2ff51c33eb4bf5fbd06a810087c3287..63a5afb54f25c011127b5f74b4f23920b15916ad 100644 (file)
@@ -708,11 +708,13 @@ static bool __init_or_module initcall_blacklisted(initcall_t fn)
 {
        struct blacklist_entry *entry;
        char fn_name[KSYM_SYMBOL_LEN];
+       unsigned long addr;
 
        if (list_empty(&blacklisted_initcalls))
                return false;
 
-       sprint_symbol_no_offset(fn_name, (unsigned long)fn);
+       addr = (unsigned long) dereference_function_descriptor(fn);
+       sprint_symbol_no_offset(fn_name, addr);
 
        list_for_each_entry(entry, &blacklisted_initcalls, next) {
                if (!strcmp(fn_name, entry->buf)) {