projects
/
users
/
jedix
/
linux-maple.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af92596
)
maple_tree: Fix potential rcu issue
author
Liam R. Howlett <Liam.Howlett@Oracle.com>
Thu, 17 Nov 2022 19:31:38 +0000
(14:31 -0500)
committer
Liam R. Howlett <Liam.Howlett@oracle.com>
Mon, 28 Nov 2022 20:58:06 +0000
(15:58 -0500)
Ensure the node isn't dead after reading the node end.
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
lib/maple_tree.c
patch
|
blob
|
history
diff --git
a/lib/maple_tree.c
b/lib/maple_tree.c
index df352f6ccc240979f2fb03b9f096e4afc579a8cc..ff28bd6d47455c4ad7474ac0d83642a0c63a3c95 100644
(file)
--- a/
lib/maple_tree.c
+++ b/
lib/maple_tree.c
@@
-4654,13
+4654,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;