From: Catalin Marinas <catalin.marinas@arm.com>
To: Liu Shixin <liushixin2@huawei.com>
Cc: Patrick Wang <patrick.wang.shcn@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/4] mm/kmemleak: fix print format of pointer in pr_debug()
Date: Mon, 9 Oct 2023 14:25:57 +0100 [thread overview]
Message-ID: <ZSP/ZR5P/xRiiq7D@arm.com> (raw)
In-Reply-To: <20231008023317.3015699-5-liushixin2@huawei.com>
On Sun, Oct 08, 2023 at 10:33:17AM +0800, Liu Shixin wrote:
> With 0x%p, the pointer will be hashed and print (____ptrval____) instead.
> And with 0x%pa, the pointer can be successfully printed but with duplicate
> prefixes, which looks like:
>
> kmemleak: kmemleak_free(0x(____ptrval____))
> kmemleak: kmemleak_free_percpu(0x(____ptrval____))
> kmemleak: kmemleak_free_part_phys(0x0x0000000a1af86000)
>
> Use 0x%px instead of 0x%p or 0x%pa to print the pointer. Then the print
> will be like:
>
> kmemleak: kmemleak_free(0xffff9111c145b020)
> kmemleak: kmemleak_free_percpu(0x00000000000333b0)
> kmemleak: kmemleak_free_part_phys(0x0000000a1af80000)
>
> Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
prev parent reply other threads:[~2023-10-09 13:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-08 2:33 [PATCH v2 0/4] Some bugfix about kmemleak Liu Shixin
2023-10-08 2:33 ` [PATCH v2 1/4] bootmem: use kmemleak_free_part_phys in put_page_bootmem Liu Shixin
2023-10-08 2:33 ` [PATCH v2 2/4] bootmem: use kmemleak_free_part_phys in free_bootmem_page Liu Shixin
2023-10-08 2:33 ` [PATCH v2 3/4] mm/kmemleak: fix partially freeing unknown object warning Liu Shixin
2023-10-09 14:58 ` Catalin Marinas
2023-10-08 2:33 ` [PATCH v2 4/4] mm/kmemleak: fix print format of pointer in pr_debug() Liu Shixin
2023-10-09 13:25 ` Catalin Marinas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZSP/ZR5P/xRiiq7D@arm.com \
--to=catalin.marinas@arm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liushixin2@huawei.com \
--cc=patrick.wang.shcn@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.