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 <subashab@codeaurora.org>
This commit is contained in:
parent
2d4b5700cc
commit
450ea4c19a
|
@ -701,7 +701,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;
|
||||
}
|
||||
|
@ -1333,7 +1333,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);
|
||||
|
|
Loading…
Reference in New Issue