lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 25 Apr 2023 13:00:03 -0400
From:   "Liam R. Howlett" <Liam.Howlett@...cle.com>
To:     Peng Zhang <zhangpeng.00@...edance.com>
Cc:     akpm@...ux-foundation.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, maple-tree@...ts.infradead.org
Subject: Re: [PATCH 8/9] maple_tree: Remove the redundant check of
 mas->offset in mas_empty_area/area_rev()

* Peng Zhang <zhangpeng.00@...edance.com> [230425 07:05]:

The subject doesn't need this much detail.  If mas->offset means
something to people reading through the git logs, they will already be
looking into the change.

> In mas_empty_area(), after mas_awalk() returns, if EBUSY is not set,
> then mas->offset must be valid, no need to check. Same in
> mas_empty_area_rev(), so delete it.

There is a lot of code in this message as well.

> 
> Signed-off-by: Peng Zhang <zhangpeng.00@...edance.com>
> ---
>  lib/maple_tree.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/lib/maple_tree.c b/lib/maple_tree.c
> index 8bfa837b7b752..964214de2ed18 100644
> --- a/lib/maple_tree.c
> +++ b/lib/maple_tree.c
> @@ -5305,13 +5305,9 @@ int mas_empty_area(struct ma_state *mas, unsigned long min,
>  		return xa_err(mas->node);
>  
>  	offset = mas->offset;
> -	if (unlikely(offset == MAPLE_NODE_SLOTS))
> -		return -EBUSY;
> -
>  	mt = mte_node_type(mas->node);
>  	pivots = ma_pivots(mas_mn(mas), mt);
>  	mas->index = max(mas->index, mas_safe_min(mas, pivots, offset));
> -
>  	mas->last = mas->index + size - 1;
>  	return 0;
>  }
> @@ -5365,9 +5361,6 @@ int mas_empty_area_rev(struct ma_state *mas, unsigned long min,
>  	if (mas_is_err(mas))
>  		return xa_err(mas->node);
>  
> -	if (unlikely(mas->offset == MAPLE_NODE_SLOTS))
> -		return -EBUSY;
> -
>  	/* Trim the upper limit to the max. */
>  	if (max < mas->last)
>  		mas->last = max;
> -- 
> 2.20.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ