Commit 28c5609
mm/mmap: preallocate maple nodes for brk vma expansion
If the brk VMA is the last vma in a maple node and meets the rare criteria
that it can be expanded, then preallocation is necessary to avoid a
potential fs_reclaim circular lock issue on low resources.
At the same time use the actual vma start address (unaligned) when calling
vma_adjust_trans_huge().
Link: https://lkml.kernel.org/r/20221011160624.1253454-1-Liam.Howlett@oracle.com
Fixes: 2e7ce7d (mm/mmap: change do_brk_flags() to expand existing VMA and add do_brk_munmap())
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Reported-by: Yu Zhao <yuzhao@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent 7be1c1a commit 28c5609
1 file changed
+6
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2942 | 2942 | | |
2943 | 2943 | | |
2944 | 2944 | | |
2945 | | - | |
2946 | | - | |
2947 | | - | |
| 2945 | + | |
| 2946 | + | |
| 2947 | + | |
| 2948 | + | |
| 2949 | + | |
2948 | 2950 | | |
2949 | 2951 | | |
2950 | 2952 | | |
2951 | 2953 | | |
2952 | 2954 | | |
2953 | 2955 | | |
2954 | | - | |
2955 | | - | |
| 2956 | + | |
2956 | 2957 | | |
2957 | 2958 | | |
2958 | 2959 | | |
| |||
2993 | 2994 | | |
2994 | 2995 | | |
2995 | 2996 | | |
2996 | | - | |
2997 | | - | |
2998 | | - | |
2999 | | - | |
3000 | | - | |
3001 | | - | |
3002 | | - | |
3003 | 2997 | | |
3004 | 2998 | | |
3005 | 2999 | | |
| |||
0 commit comments