lkml.org 
[lkml]   [2021]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 26/94] Maple Tree: Add new data structure
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.

\
 
 \ /
  Last update: 2021-05-14 14:19    [W:0.645 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site