diff options
| author | Naveen Ramaraj <nramaraj@codeaurora.org> | 2017-05-25 17:23:46 -0700 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-08-24 17:33:45 +0200 |
| commit | e2dbab62e9a8daa6fa1e990057f80c2d82d413c7 (patch) | |
| tree | dfa3e2097ae3897e13a7ff11bc2e9ae71c4c8929 | |
| parent | f5810b1acd1322f7a49dc99f769ec08b7f3ca4f6 (diff) | |
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
Bug: 37340687, 37341313
CRs-Fixed: 987041
Change-Id: I2eb33c63168ab26818dfdb3e11315f2ce8f24fa5
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Signed-off-by: Naveen Ramaraj <nramaraj@codeaurora.org>
| -rw-r--r-- | net/core/neighbour.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 49d688390..6e0c23fdd 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -700,7 +700,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; } @@ -1318,7 +1318,7 @@ int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb) out: return rc; discard: - neigh_dbg(1, "%s: dst=%p neigh=%p\n", __func__, dst, neigh); + neigh_dbg(1, "%s: dst=%pK neigh=%pK\n", __func__, dst, neigh); out_kfree_skb: rc = -EINVAL; kfree_skb(skb); |
