Skip to content

Commit

Permalink
init/main.c: fix initcall_blacklisted on ia64, ppc64 and parisc64
Browse files Browse the repository at this point in the history
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: c8cdd2b (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]>
  • Loading branch information
Villemoes authored and torvalds committed Jun 25, 2016
1 parent 5a9294e commit 0fd5ed8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 0fd5ed8

Please sign in to comment.