Commit 06e8fd9
maple_tree: fix mas_empty_area() search
The internal function of mas_awalk() was incorrectly skipping the last
entry in a node, which could potentially be NULL. This is only a problem
for the left-most node in the tree - otherwise that NULL would not exist.
Fix mas_awalk() by using the metadata to obtain the end of the node for
the loop and the logical pivot as apposed to the raw pivot value.
Link: https://lkml.kernel.org/r/20230414145728.4067069-2-Liam.Howlett@oracle.com
Fixes: 54a611b ("Maple Tree: add new data structure")
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Reported-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent fad8e42 commit 06e8fd9
1 file changed
Lines changed: 11 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5056 | 5056 | | |
5057 | 5057 | | |
5058 | 5058 | | |
5059 | | - | |
5060 | | - | |
5061 | | - | |
5062 | | - | |
| 5059 | + | |
| 5060 | + | |
| 5061 | + | |
| 5062 | + | |
5063 | 5063 | | |
5064 | 5064 | | |
5065 | 5065 | | |
5066 | 5066 | | |
5067 | 5067 | | |
5068 | 5068 | | |
5069 | 5069 | | |
5070 | | - | |
| 5070 | + | |
| 5071 | + | |
| 5072 | + | |
| 5073 | + | |
5071 | 5074 | | |
5072 | 5075 | | |
5073 | | - | |
5074 | | - | |
5075 | | - | |
5076 | | - | |
| 5076 | + | |
| 5077 | + | |
| 5078 | + | |
5077 | 5079 | | |
5078 | 5080 | | |
5079 | 5081 | | |
| |||
0 commit comments