UPSTREAM: mm/slab.c: do not hash pointers when debugging slab
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 14 Dec 2017 23:32:58 +0000 (15:32 -0800)
committerAlistair Strachan <astrachan@google.com>
Fri, 29 Mar 2019 04:16:19 +0000 (21:16 -0700)
commit9916e5987e606e740b00589a7012b349ab50ddd8
tree3f24e78201ff1cc7af7b8b060cd41d3eec13d51e
parent6ea6d8b10507784c52de020008e8964b1a32f039
UPSTREAM: mm/slab.c: do not hash pointers when debugging slab

If CONFIG_DEBUG_SLAB/CONFIG_DEBUG_SLAB_LEAK are enabled, the slab code
prints extra debug information when e.g.  corruption is detected.  This
includes pointers, which are not very useful when hashed.

Fix this by using %px to print unhashed pointers instead where it makes
sense, and by removing the printing of a last user pointer referring to
code.

[geert+renesas@glider.be: v2]
Link: http://lkml.kernel.org/r/1513179267-2509-1-git-send-email-geert+renesas@glider.be
Link: http://lkml.kernel.org/r/1512641861-5113-1-git-send-email-geert+renesas@glider.be
Fixes: ad67b74d2469d9b8 ("printk: hash addresses printed with %p")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Christoph Lameter <cl@linux.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: "Tobin C . Harding" <me@tobin.cc>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 85c3e4a5a185f22649c6bf33bdce7bb1ac890921)
Signed-off-by: Sandeep Patil <sspatil@android.com>
Bug: 78533979
Test: Build and boot cuttlefish
Change-Id: I721a4ca47adfbb70b3fa1859a66a3c5fbca0dd00
mm/slab.c