Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d26e6e51 authored by Divya Ponnusamy's avatar Divya Ponnusamy Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarDivya Ponnusamy <pdivya@codeaurora.org>
parent 450bd44d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/* 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
@@ -288,7 +288,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);
+3 −3
Original line number Diff line number Diff line
@@ -617,14 +617,14 @@ int sync_fence_wait(struct sync_fence *fence, long timeout)
		return err;

	if (fence->status < 0) {
		pr_info("fence error %d on [%p]\n", fence->status, fence);
		pr_info("fence error %d on [%pK]\n", fence->status, fence);
		sync_dump();
		return fence->status;
	}

	if (fence->status == 0) {
		if (timeout > 0) {
			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();
		}
@@ -925,7 +925,7 @@ static void sync_print_fence(struct seq_file *s, struct sync_fence *fence)
	struct list_head *pos;
	unsigned long flags;

	seq_printf(s, "[%p] %s: %s\n", fence, fence->name,
	seq_printf(s, "[%pK] %s: %s\n", fence, fence->name,
		   sync_status_str(fence->status));

	list_for_each(pos, &fence->pt_list_head) {