linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Sven Schnelle <svens@linux.ibm.com>
To: Liam Howlett <liam.howlett@oracle.com>
Cc: "maple-tree@lists.infradead.org" <maple-tree@lists.infradead.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Yu Zhao <yuzhao@google.com>, Hugh Dickins <hughd@google.com>
Subject: Re: [PATCH] maple_tree: Fix mas_empty_area() wrapping
Date: Tue, 19 Jul 2022 19:39:41 +0200	[thread overview]
Message-ID: <yt9dtu7dhuhu.fsf@linux.ibm.com> (raw)
In-Reply-To: <20220719170118.3296447-1-Liam.Howlett@oracle.com> (Liam Howlett's message of "Tue, 19 Jul 2022 17:01:30 +0000")

Liam Howlett <liam.howlett@oracle.com> writes:

> Set the error code correctly when at the left most node and search has
> been exhausted.  This was an overflow bug.
>
> Reported-by: Sven Schnelle <svens@linux.ibm.com>
> Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>

That fixes it, thanks!

Tested-by: Sven Schnelle <svens@linux.ibm.com>

> ---
>  lib/maple_tree.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/maple_tree.c b/lib/maple_tree.c
> index 1b8130f19c2e..0c0bda979693 100644
> --- a/lib/maple_tree.c
> +++ b/lib/maple_tree.c
> @@ -4994,7 +4994,7 @@ static inline bool mas_anode_descend(struct ma_state *mas, unsigned long size)
>  		}
>  next_slot:
>  		min = pivot + 1;
> -		if (mas->last < min) {
> +		if (mas->last <= pivot) {
>  			mas_set_err(mas, -EBUSY);
>  			return true;
>  		}


      reply	other threads:[~2022-07-19 17:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-19 17:01 Liam Howlett
2022-07-19 17:39 ` Sven Schnelle [this message]

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=yt9dtu7dhuhu.fsf@linux.ibm.com \
    --to=svens@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=liam.howlett@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=maple-tree@lists.infradead.org \
    --cc=yuzhao@google.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