linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Peng Zhang <zhangpeng.00@bytedance.com>
Cc: Liam.Howlett@oracle.com, snild@sony.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org,
	Stable@vger.kernel.org
Subject: Re: [PATCH] maple_tree: Fix the error of mas->min/max in mas_skip_node()
Date: Tue, 7 Mar 2023 17:21:31 +0100	[thread overview]
Message-ID: <ZAdki6kTfwm/B+yD@kroah.com> (raw)
In-Reply-To: <20230307160340.57074-1-zhangpeng.00@bytedance.com>

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@bytedance.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>


  reply	other threads:[~2023-03-07 16:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07 16:03 Peng Zhang
2023-03-07 16:21 ` Greg KH [this message]
2023-03-09  1:55 ` Andrew Morton
2023-03-09  2:09   ` Peng Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZAdki6kTfwm/B+yD@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Liam.Howlett@oracle.com \
    --cc=Stable@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=maple-tree@lists.infradead.org \
    --cc=snild@sony.com \
    --cc=zhangpeng.00@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox