summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDivya Ponnusamy <pdivya@codeaurora.org>2016-06-08 13:56:23 +0530
committerKyle Yan <kyan@codeaurora.org>2016-06-21 15:12:20 -0700
commitaaaea235c69aad17b93d33d9da5dd6494cc8a766 (patch)
treee47e2c58dde60f119716950da13ecdd647be9c3e /drivers
parentee800fccbed6ff45ea3f37970154d41d4c3854a9 (diff)
staging: android: Change %p to %pK in debug messages
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. Change-Id: Ib1adf14e9620ad7b1bd3e962001c852610210d46 Signed-off-by: Divya Ponnusamy <pdivya@codeaurora.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/android/oneshot_sync.c4
-rw-r--r--drivers/staging/android/sync.c4
-rw-r--r--drivers/staging/android/sync_debug.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/android/oneshot_sync.c b/drivers/staging/android/oneshot_sync.c
index b44aff1b963a..dd59c713efa8 100644
--- a/drivers/staging/android/oneshot_sync.c
+++ b/drivers/staging/android/oneshot_sync.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -289,7 +289,7 @@ int oneshot_fence_signal(struct oneshot_sync_timeline *timeline,
}
spin_unlock(&timeline->lock);
if (ret == -EINVAL)
- pr_debug("fence: %p not from this timeline\n", fence);
+ pr_debug("fence: %pK not from this timeline\n", fence);
if (signaled)
sync_timeline_signal(&timeline->obj);
diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index da101a506cd2..9b8d17ce3a5e 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -390,7 +390,7 @@ int sync_fence_wait(struct sync_fence *fence, long timeout)
return ret;
} else if (ret == 0) {
if (timeout) {
- pr_info("fence timeout on [%p] after %dms\n", fence,
+ pr_info("fence timeout on [%pK] after %dms\n", fence,
jiffies_to_msecs(timeout));
sync_dump();
}
@@ -399,7 +399,7 @@ int sync_fence_wait(struct sync_fence *fence, long timeout)
ret = atomic_read(&fence->status);
if (ret) {
- pr_info("fence error %ld on [%p]\n", ret, fence);
+ pr_info("fence error %ld on [%pK]\n", ret, fence);
sync_dump();
}
return ret;
diff --git a/drivers/staging/android/sync_debug.c b/drivers/staging/android/sync_debug.c
index 91ed2c4cff45..aaa96c3df45b 100644
--- a/drivers/staging/android/sync_debug.c
+++ b/drivers/staging/android/sync_debug.c
@@ -149,7 +149,7 @@ static void sync_print_fence(struct seq_file *s, struct sync_fence *fence)
unsigned long flags;
int i;
- seq_printf(s, "[%p] %s: %s\n", fence, fence->name,
+ seq_printf(s, "[%pK] %s: %s\n", fence, fence->name,
sync_status_str(atomic_read(&fence->status)));
for (i = 0; i < fence->num_fences; ++i) {