From: Dmitry Osipenko <digetx@gmail.com>
To: Liam Howlett <liam.howlett@oracle.com>,
"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>
Subject: Re: [PATCH] maple_tree: Fix mas_alloc_nodes()
Date: Sat, 6 Aug 2022 18:12:40 +0300 [thread overview]
Message-ID: <ad252b8b-d9b9-f1c4-a853-39d483d1c0d4@gmail.com> (raw)
In-Reply-To: <20220802193612.2886170-1-Liam.Howlett@oracle.com>
02.08.2022 22:36, Liam Howlett пишет:
> Use MAPLE_ALLOC_SLOTS, which differs on 32bit. This was causing an
> out of bounds issue on 32bit bulk allocations
>
> Fixes: 06b152b7980a (Maple Tree: add new data structure)
> Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.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 4e41f3394114..032e7bb0d44f 100644
> --- a/lib/maple_tree.c
> +++ b/lib/maple_tree.c
> @@ -1242,7 +1242,7 @@ static inline void mas_alloc_nodes(struct ma_state *mas, gfp_t gfp)
>
> node = mas->alloc;
> while (requested) {
> - max_req = MAPLE_NODE_SLOTS - 1;
> + max_req = MAPLE_ALLOC_SLOTS;
> if (node->slot[0]) {
> unsigned int offset = node->node_count + 1;
>
Hello Liam,
This fixed the bug, thank you!
Tested-by: Dmitry Osipenko <digetx@gmail.com> # ARM32 Tegra
prev parent reply other threads:[~2022-08-06 15:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-02 19:36 Liam Howlett
2022-08-06 15:12 ` Dmitry Osipenko [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=ad252b8b-d9b9-f1c4-a853-39d483d1c0d4@gmail.com \
--to=digetx@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=liam.howlett@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=maple-tree@lists.infradead.org \
/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
all inboxes | Powered by JetHome®