Skip to content

Commit 3a6f33d

Browse files
clementlegerakpm00
authored andcommitted
mm/kmemleak: use %pK to display kernel pointers in backtrace
Currently, %p is used to display kernel pointers in backtrace which result in a hashed value that is not usable to correlate the address for debug. Use %pK which will respect the kptr_restrict configuration value and thus allow to extract meaningful information from the backtrace. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Clément Léger <[email protected]> Cc: Alexandre Belloni <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Thomas Petazzoni <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 56a6161 commit 3a6f33d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/kmemleak.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ static void print_unreferenced(struct seq_file *seq,
361361

362362
for (i = 0; i < nr_entries; i++) {
363363
void *ptr = (void *)entries[i];
364-
warn_or_seq_printf(seq, " [<%p>] %pS\n", ptr, ptr);
364+
warn_or_seq_printf(seq, " [<%pK>] %pS\n", ptr, ptr);
365365
}
366366
}
367367

0 commit comments

Comments
 (0)