[<prev] [next>] [day] [month] [year] [list]
Message-ID: <161313342401.23325.5802422578509180690.tip-bot2@tip-bot2>
Date: Fri, 12 Feb 2021 12:37:04 -0000
From: "tip-bot2 for Paul E. McKenney" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Christoph Lameter <cl@...ux.com>,
Pekka Enberg <penberg@...nel.org>,
David Rientjes <rientjes@...gle.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
<linux-mm@...ck.org>, Andrii Nakryiko <andrii@...nel.org>,
Vlastimil Babka <vbabka@...e.cz>,
Naresh Kamboju <naresh.kamboju@...aro.org>,
"Paul E. McKenney" <paulmck@...nel.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: core/rcu] mm: Make mem_dump_obj() handle NULL and zero-sized pointers
The following commit has been merged into the core/rcu branch of tip:
Commit-ID: b70fa3b12fc8d2b870d1ac7fd44da89271eb8705
Gitweb: https://git.kernel.org/tip/b70fa3b12fc8d2b870d1ac7fd44da89271eb8705
Author: Paul E. McKenney <paulmck@...nel.org>
AuthorDate: Tue, 08 Dec 2020 15:26:22 -08:00
Committer: Paul E. McKenney <paulmck@...nel.org>
CommitterDate: Fri, 22 Jan 2021 15:23:57 -08:00
mm: Make mem_dump_obj() handle NULL and zero-sized pointers
This commit makes mem_dump_obj() call out NULL and zero-sized pointers
specially instead of classifying them as non-paged memory.
Cc: Christoph Lameter <cl@...ux.com>
Cc: Pekka Enberg <penberg@...nel.org>
Cc: David Rientjes <rientjes@...gle.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@....com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: <linux-mm@...ck.org>
Reported-by: Andrii Nakryiko <andrii@...nel.org>
Acked-by: Vlastimil Babka <vbabka@...e.cz>
Tested-by: Naresh Kamboju <naresh.kamboju@...aro.org>
Signed-off-by: Paul E. McKenney <paulmck@...nel.org>
---
mm/util.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/mm/util.c b/mm/util.c
index da46f9d..92f23d2 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -997,7 +997,12 @@ int __weak memcmp_pages(struct page *page1, struct page *page2)
void mem_dump_obj(void *object)
{
if (!virt_addr_valid(object)) {
- pr_cont(" non-paged (local) memory.\n");
+ if (object == NULL)
+ pr_cont(" NULL pointer.\n");
+ else if (object == ZERO_SIZE_PTR)
+ pr_cont(" zero-size pointer.\n");
+ else
+ pr_cont(" non-paged (local) memory.\n");
return;
}
if (kmem_valid_obj(object)) {
Powered by blists - more mailing lists