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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZAdki6kTfwm/B+yD@kroah.com>
Date:   Tue, 7 Mar 2023 17:21:31 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Peng Zhang <zhangpeng.00@...edance.com>
Cc:     Liam.Howlett@...cle.com, snild@...y.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, maple-tree@...ts.infradead.org,
        Stable@...r.kernel.org
Subject: Re: [PATCH] maple_tree: Fix the error of mas->min/max in
 mas_skip_node()

On Wed, Mar 08, 2023 at 12:03:40AM +0800, Peng Zhang wrote:
> The assignment of mas->min and mas->max is wrong. mas->min and mas->max
> should represent the range of the current node. After mas_ascend()
> returns, mas-min and mas->max already represent the range of the current
> node, so we should delete these assignments of mas->min and mas->max.
> 
> Signed-off-by: Peng Zhang <zhangpeng.00@...edance.com>
> ---
>  lib/maple_tree.c | 10 ----------
>  1 file changed, 10 deletions(-)
> 
> diff --git a/lib/maple_tree.c b/lib/maple_tree.c
> index f5bee48de569..d4ddf7f8adc7 100644
> --- a/lib/maple_tree.c
> +++ b/lib/maple_tree.c
> @@ -5157,9 +5157,6 @@ static inline bool mas_rewind_node(struct ma_state *mas)
>   */
>  static inline bool mas_skip_node(struct ma_state *mas)
>  {
> -	unsigned long *pivots;
> -	enum maple_type mt;
> -
>  	if (mas_is_err(mas))
>  		return false;
>  
> @@ -5173,14 +5170,7 @@ static inline bool mas_skip_node(struct ma_state *mas)
>  			mas_ascend(mas);
>  		}
>  	} while (mas->offset >= mas_data_end(mas));
> -
> -	mt = mte_node_type(mas->node);
> -	pivots = ma_pivots(mas_mn(mas), mt);
> -	mas->min = pivots[mas->offset] + 1;
>  	mas->offset++;
> -	if (mas->offset < mt_slots[mt])
> -		mas->max = pivots[mas->offset];
> -
>  	return true;
>  }
>  
> -- 
> 2.20.1
> 

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ