From 7eac5294333a26ece2edd3e1ce704f52df2dd611 Mon Sep 17 00:00:00 2001 From: Tejaswi Tanikella Date: Tue, 25 Jul 2017 13:30:09 +0530 Subject: [PATCH] net: core: neighbour: Change the print format for addresses Print format %p displays the kernel address while bypassing the kptr_restrict sysctl settings. Change the print format for addresses from %p to %pK. If kptr_restrict is enabled, addresses are printed as zeroes. To view the actual addresses, disable kptr_restrict by - echo 0 > /proc/sys/kernel/kptr_restrict . CRs-Fixed: 987041 Change-Id: I2eb33c63168ab26818dfdb3e11315f2ce8f24fa5 Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: Tejaswi Tanikella Signed-off-by: Chinmay Agarwal --- net/core/neighbour.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 9e7fc929bc50..f984255b6880 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -833,7 +833,7 @@ void neigh_destroy(struct neighbour *neigh) NEIGH_CACHE_STAT_INC(neigh->tbl, destroys); if (!neigh->dead) { - pr_warn("Destroying alive neighbour %p\n", neigh); + pr_warn("Destroying alive neighbour %pK\n", neigh); dump_stack(); return; }