Skip to content

Commit 51d96dc

Browse files
hdellertorvalds
authored andcommitted
random: fix warning message on ia64 and parisc
Fix the warning message on the parisc and IA64 architectures to show the correct function name of the caller by using %pS instead of %pF. The message is printed with the value of _RET_IP_ which calls __builtin_return_address(0) and as such returns the IP address caller instead of pointer to a function descriptor of the caller. The effect of this patch is visible on the parisc and ia64 architectures only since those are the ones which use function descriptors while on all others %pS and %pF will behave the same. Cc: Theodore Ts'o <tytso@mit.edu> Cc: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Helge Deller <deller@gmx.de> Fixes: eecabf5 ("random: suppress spammy warnings about unseeded randomness") Fixes: d06bfd1 ("random: warn when kernel uses unseeded randomness") Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 623ce34 commit 51d96dc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/char/random.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,7 @@ static void _warn_unseeded_randomness(const char *func_name, void *caller,
14921492
#ifndef CONFIG_WARN_ALL_UNSEEDED_RANDOM
14931493
print_once = true;
14941494
#endif
1495-
pr_notice("random: %s called from %pF with crng_init=%d\n",
1495+
pr_notice("random: %s called from %pS with crng_init=%d\n",
14961496
func_name, caller, crng_init);
14971497
}
14981498

0 commit comments

Comments
 (0)