* [merged mm-stable] maple_tree-reduce-user-error-potential.patch removed from -mm tree
@ 2023-02-10 0:52 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-02-10 0:52 UTC (permalink / raw)
To: mm-commits, Liam.Howlett, Liam.Howlett, akpm
The quilt patch titled
Subject: maple_tree: reduce user error potential
has been removed from the -mm tree. Its filename was
maple_tree-reduce-user-error-potential.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: "Liam R. Howlett" <Liam.Howlett@Oracle.com>
Subject: maple_tree: reduce user error potential
Date: Fri, 20 Jan 2023 11:26:04 -0500
When iterating, a user may operate on the tree and cause the maple state
to be altered and left in an unintuitive state. Detect this scenario and
correct it by setting to the limit and invalidating the state.
Link: https://lkml.kernel.org/r/20230120162650.984577-4-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
lib/maple_tree.c | 10 ++++++++++
1 file changed, 10 insertions(+)
--- a/lib/maple_tree.c~maple_tree-reduce-user-error-potential
+++ a/lib/maple_tree.c
@@ -4732,6 +4732,11 @@ static inline void *mas_next_entry(struc
unsigned long last;
enum maple_type mt;
+ if (mas->index > limit) {
+ mas->index = mas->last = limit;
+ mas_pause(mas);
+ return NULL;
+ }
last = mas->last;
retry:
offset = mas->offset;
@@ -4838,6 +4843,11 @@ static inline void *mas_prev_entry(struc
{
void *entry;
+ if (mas->index < min) {
+ mas->index = mas->last = min;
+ mas_pause(mas);
+ return NULL;
+ }
retry:
while (likely(!mas_is_none(mas))) {
entry = mas_prev_nentry(mas, min, mas->index);
_
Patches currently in -mm which might be from Liam.Howlett@Oracle.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-10 0:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-10 0:52 [merged mm-stable] maple_tree-reduce-user-error-potential.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.