[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <73309bf-ca5b-b0ba-8ac-4be7dcc278b7@gentwo.de>
Date: Thu, 26 Jan 2023 12:28:49 +0100 (CET)
From: Christoph Lameter <cl@...two.de>
To: George Prekas <george@...abrica.net>
cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Catalin Marinas <catalin.marinas@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
Pekka Enberg <penberg@...nel.org>,
David Rientjes <rientjes@...gle.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Vlastimil Babka <vbabka@...e.cz>,
Roman Gushchin <roman.gushchin@...ux.dev>,
Hyeonggon Yoo <42.hyeyoo@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>,
Fenghua Yu <fenghua.yu@...el.com>,
Andrei Vagin <avagin@...il.com>
Subject: Re: [PATCH 7/9] mm: kmemleak: erase page->s_mem in slab_destroy
On Mon, 23 Jan 2023, George Prekas wrote:
> The field s_mem of struct page is initialized with the virtual address
> of the page in function alloc_slabmgmt. If kmalloc allocates an object
> that starts on this page, then kmemleak knows that this object has 2
> references. On slab_destroy, s_mem should not continue referring to any
> allocated object in the future.
Nope.
s_mem is a pointer to an array of objects. It is not a pointer to a page.
If a slab-caches is used for slabmanagement then these objects
contain slab metadata which may be a bit confusing.
Powered by blists - more mailing lists