[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201210032535.GR2657@paulmck-ThinkPad-P72>
Date: Wed, 9 Dec 2020 19:25:35 -0800
From: "Paul E. McKenney" <paulmck@...nel.org>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: rcu@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-team@...com, mingo@...nel.org, jiangshanlai@...il.com,
akpm@...ux-foundation.org, mathieu.desnoyers@...icios.com,
josh@...htriplett.org, tglx@...utronix.de, peterz@...radead.org,
rostedt@...dmis.org, dhowells@...hat.com, edumazet@...gle.com,
fweisbec@...il.com, oleg@...hat.com, joel@...lfernandes.org,
iamjoonsoo.kim@....com, andrii@...nel.org,
Christoph Lameter <cl@...ux.com>,
Pekka Enberg <penberg@...nel.org>,
David Rientjes <rientjes@...gle.com>, linux-mm@...ck.org
Subject: Re: [PATCH v2 sl-b 2/5] mm: Make mem_dump_obj() handle NULL and
zero-sized pointers
On Wed, Dec 09, 2020 at 06:48:47PM +0100, Vlastimil Babka wrote:
> On 12/9/20 2:13 AM, paulmck@...nel.org wrote:
> > From: "Paul E. McKenney" <paulmck@...nel.org>
> >
> > 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>
> > Signed-off-by: Paul E. McKenney <paulmck@...nel.org>
>
> Acked-by: Vlastimil Babka <vbabka@...e.cz>
Applied, thank you!
Thanx, Paul
> > ---
> > mm/util.c | 7 ++++++-
> > 1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/mm/util.c b/mm/util.c
> > index d0e60d2..8c2449f 100644
> > --- a/mm/util.c
> > +++ b/mm/util.c
> > @@ -985,7 +985,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