Commit 58c5d0d
mm/mmap: regression fix for unmapped_area{_topdown}
The maple tree limits the gap returned to a window that specifically fits
what was asked. This may not be optimal in the case of switching search
directions or a gap that does not satisfy the requested space for other
reasons. Fix the search by retrying the operation and limiting the search
window in the rare occasion that a conflict occurs.
Link: https://lkml.kernel.org/r/20230414185919.4175572-1-Liam.Howlett@oracle.com
Fixes: 3499a13 ("mm/mmap: use maple tree for unmapped_area{_topdown}")
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 06e8fd9 commit 58c5d0d
1 file changed
Lines changed: 43 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1518 | 1518 | | |
1519 | 1519 | | |
1520 | 1520 | | |
1521 | | - | |
| 1521 | + | |
| 1522 | + | |
1522 | 1523 | | |
1523 | 1524 | | |
1524 | 1525 | | |
| |||
1527 | 1528 | | |
1528 | 1529 | | |
1529 | 1530 | | |
1530 | | - | |
1531 | | - | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
1532 | 1534 | | |
1533 | 1535 | | |
1534 | 1536 | | |
1535 | 1537 | | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
1536 | 1554 | | |
1537 | 1555 | | |
1538 | 1556 | | |
| |||
1548 | 1566 | | |
1549 | 1567 | | |
1550 | 1568 | | |
1551 | | - | |
| 1569 | + | |
| 1570 | + | |
1552 | 1571 | | |
1553 | 1572 | | |
1554 | 1573 | | |
1555 | 1574 | | |
1556 | 1575 | | |
1557 | 1576 | | |
1558 | 1577 | | |
1559 | | - | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
1560 | 1581 | | |
1561 | 1582 | | |
1562 | 1583 | | |
1563 | 1584 | | |
1564 | 1585 | | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
1565 | 1603 | | |
1566 | 1604 | | |
1567 | 1605 | | |
| |||
0 commit comments