[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210514212930.3vprzwvuyhh4sdml@revolver>
Date: Fri, 14 May 2021 21:29:40 +0000
From: Liam Howlett <liam.howlett@...cle.com>
To: Peter Zijlstra <peterz@...radead.org>
CC: "maple-tree@...ts.infradead.org" <maple-tree@...ts.infradead.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Song Liu <songliubraving@...com>,
Davidlohr Bueso <dave@...olabs.net>,
"Paul E . McKenney" <paulmck@...nel.org>,
Matthew Wilcox <willy@...radead.org>,
Laurent Dufour <ldufour@...ux.ibm.com>,
David Rientjes <rientjes@...gle.com>,
Axel Rasmussen <axelrasmussen@...gle.com>,
Suren Baghdasaryan <surenb@...gle.com>,
Vlastimil Babka <vbabka@...e.cz>,
Rik van Riel <riel@...riel.com>,
Michel Lespinasse <walken.cr@...il.com>
Subject: Re: [PATCH 26/94] Maple Tree: Add new data structure
* Peter Zijlstra <peterz@...radead.org> [210514 08:18]:
> On Wed, Apr 28, 2021 at 03:36:02PM +0000, Liam Howlett wrote:
> > +static void mas_set_height(struct ma_state *mas)
> > +{
> > + unsigned int new_flags = mas->tree->ma_flags;
> > +
> > + new_flags &= ~MAPLE_HEIGHT_MASK;
> > + new_flags |= mas->depth << MAPLE_HEIGHT_OFFSET;
> > + mas->tree->ma_flags = new_flags;
> > +}
>
> This goes sideways when mas->depth is too large; I didn't quickly see an
> assertion / range checks for mas->depth anywhere.
>
I will add an assert here. Thank you.
Powered by blists - more mailing lists