projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e7f43ca
)
maple_tree: fix potential rcu issue
author
Liam R. Howlett
<Liam.Howlett@Oracle.com>
Fri, 20 Jan 2023 16:26:03 +0000
(11:26 -0500)
committer
Andrew Morton
<akpm@linux-foundation.org>
Fri, 10 Feb 2023 00:51:30 +0000
(16:51 -0800)
Ensure the node isn't dead after reading the node end.
Link:
https://lkml.kernel.org/r/20230120162650.984577-3-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
patch
|
blob
|
history
diff --git
a/lib/maple_tree.c
b/lib/maple_tree.c
index 1c5d3b640a2469d06818362f431c67859304577e..7e3cf5b7e68b34e7d77c8cd3a0722941fcea6b1a 100644
(file)
--- a/
lib/maple_tree.c
+++ b/
lib/maple_tree.c
@@
-4655,13
+4655,13
@@
static inline void *mas_next_nentry(struct ma_state *mas,
pivots = ma_pivots(node, type);
slots = ma_slots(node, type);
mas->index = mas_safe_min(mas, pivots, mas->offset);
+ count = ma_data_end(node, type, pivots, mas->max);
if (ma_dead_node(node))
return NULL;
if (mas->index > max)
return NULL;
- count = ma_data_end(node, type, pivots, mas->max);
if (mas->offset > count)
return NULL;