[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1804101512350.30225@nuc-kabylake>
Date: Tue, 10 Apr 2018 15:21:45 -0500 (CDT)
From: Christopher Lameter <cl@...ux.com>
To: Matthew Wilcox <willy@...radead.org>
cc: Eric Dumazet <eric.dumazet@...il.com>, linux-mm@...ck.org,
Matthew Wilcox <mawilcox@...rosoft.com>,
Pekka Enberg <penberg@...nel.org>,
David Rientjes <rientjes@...gle.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, Jan Kara <jack@...e.cz>,
Jeff Layton <jlayton@...hat.com>,
Mel Gorman <mgorman@...hsingularity.net>,
stable@...r.kernel.org
Subject: Re: [PATCH 1/2] slab: __GFP_ZERO is incompatible with a
constructor
On Tue, 10 Apr 2018, Matthew Wilcox wrote:
> > Objects can be freed and reused and still be accessed from code that
> > thinks the object is the old and not the new object....
>
> Yes, I know, that's the point of RCU typesafety. My point is that an
> object *which has never been used* can't be accessed. So you don't *need*
> a constructor.
But the object needs to have the proper contents after it was released and
re-allocated. Some objects may rely on contents (like list heads)
surviving the realloc process because access must always be possible.
validate_slab() checks on proper metadata content in a slab
although it does not access the payload. So that may work you separate
the payload init from the metadata init.
Powered by blists - more mailing lists