Commit 7327e81
maple_tree: fix mas_empty_area_rev() lower bound validation
mas_empty_area_rev() was not correctly validating the start of a gap
against the lower limit. This could lead to the range starting lower than
the requested minimum.
Fix the issue by better validating a gap once one is found.
This commit also adds tests to the maple tree test suite for this issue
and tests the mas_empty_area() function for similar bound checking.
Link: https://lkml.kernel.org/r/[email protected]
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216911
Fixes: 54a611b ("Maple Tree: add new data structure")
Signed-off-by: Liam R. Howlett <[email protected]>
Reported-by: <[email protected]>
Link: https://lore.kernel.org/linux-mm/[email protected]/
Tested-by: Holger Hoffsttte <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>1 parent 24b5308 commit 7327e81
2 files changed
+97
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4887 | 4887 | | |
4888 | 4888 | | |
4889 | 4889 | | |
4890 | | - | |
| 4890 | + | |
4891 | 4891 | | |
4892 | 4892 | | |
4893 | 4893 | | |
| |||
4909 | 4909 | | |
4910 | 4910 | | |
4911 | 4911 | | |
4912 | | - | |
4913 | | - | |
| 4912 | + | |
4914 | 4913 | | |
4915 | 4914 | | |
4916 | 4915 | | |
| |||
4941 | 4940 | | |
4942 | 4941 | | |
4943 | 4942 | | |
4944 | | - | |
4945 | | - | |
4946 | | - | |
4947 | | - | |
| 4943 | + | |
| 4944 | + | |
4948 | 4945 | | |
4949 | 4946 | | |
4950 | 4947 | | |
| |||
4961 | 4958 | | |
4962 | 4959 | | |
4963 | 4960 | | |
4964 | | - | |
4965 | | - | |
| 4961 | + | |
| 4962 | + | |
4966 | 4963 | | |
| 4964 | + | |
| 4965 | + | |
4967 | 4966 | | |
4968 | 4967 | | |
4969 | 4968 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2517 | 2517 | | |
2518 | 2518 | | |
2519 | 2519 | | |
| 2520 | + | |
| 2521 | + | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
| 2530 | + | |
| 2531 | + | |
| 2532 | + | |
| 2533 | + | |
| 2534 | + | |
| 2535 | + | |
| 2536 | + | |
| 2537 | + | |
| 2538 | + | |
| 2539 | + | |
| 2540 | + | |
| 2541 | + | |
| 2542 | + | |
| 2543 | + | |
| 2544 | + | |
| 2545 | + | |
| 2546 | + | |
| 2547 | + | |
| 2548 | + | |
| 2549 | + | |
| 2550 | + | |
| 2551 | + | |
| 2552 | + | |
| 2553 | + | |
| 2554 | + | |
| 2555 | + | |
| 2556 | + | |
| 2557 | + | |
| 2558 | + | |
| 2559 | + | |
| 2560 | + | |
| 2561 | + | |
| 2562 | + | |
| 2563 | + | |
| 2564 | + | |
| 2565 | + | |
| 2566 | + | |
| 2567 | + | |
| 2568 | + | |
| 2569 | + | |
| 2570 | + | |
| 2571 | + | |
| 2572 | + | |
| 2573 | + | |
| 2574 | + | |
| 2575 | + | |
| 2576 | + | |
| 2577 | + | |
| 2578 | + | |
| 2579 | + | |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
| 2583 | + | |
| 2584 | + | |
| 2585 | + | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
| 2598 | + | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
| 2603 | + | |
| 2604 | + | |
2520 | 2605 | | |
2521 | 2606 | | |
2522 | 2607 | | |
| |||
2765 | 2850 | | |
2766 | 2851 | | |
2767 | 2852 | | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
2768 | 2857 | | |
2769 | 2858 | | |
2770 | 2859 | | |
| |||
0 commit comments