Re: [PATCH 26/94] Maple Tree: Add new data structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Peter Zijlstra <peterz@xxxxxxxxxxxxx> [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.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux