drivers: dma-buf: Change %p to %pK in debug messages
diff mbox series

Message ID
State New, archived
Headers show
  • drivers: dma-buf: Change %p to %pK in debug messages
Related show

Commit Message

Daniel Rosenberg May 3, 2018, 12:03 a.m. UTC
The format specifier %p can leak kernel addresses
while not valuing the kptr_restrict system settings.
Use %pK instead of %p, which also evaluates whether
kptr_restrict is set.

Signed-off-by: Divya Ponnusamy <>
Signed-off-by: Daniel Rosenberg <>
Cc: stable <>
 drivers/dma-buf/sync_debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff mbox series

diff --git a/drivers/dma-buf/sync_debug.c b/drivers/dma-buf/sync_debug.c
index c4c8ecb24aa9..d8d340542a79 100644
--- a/drivers/dma-buf/sync_debug.c
+++ b/drivers/dma-buf/sync_debug.c
@@ -133,7 +133,7 @@  static void sync_print_sync_file(struct seq_file *s,
 	char buf[128];
 	int i;
-	seq_printf(s, "[%p] %s: %s\n", sync_file,
+	seq_printf(s, "[%pK] %s: %s\n", sync_file,
 		   sync_file_get_name(sync_file, buf, sizeof(buf)),