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>
This commit is contained in:
parent
ee800fccbe
commit
aaaea235c6
3 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue