acrn-kernel/arch/s390/mm
Linus Torvalds e6bbad7571 mm: always expand the stack with the mmap write lock held
commit 8d7071af89 upstream

This finishes the job of always holding the mmap write lock when
extending the user stack vma, and removes the 'write_locked' argument
from the vm helper functions again.

For some cases, we just avoid expanding the stack at all: drivers and
page pinning really shouldn't be extending any stacks.  Let's see if any
strange users really wanted that.

It's worth noting that architectures that weren't converted to the new
lock_mm_and_find_vma() helper function are left using the legacy
"expand_stack()" function, but it has been changed to drop the mmap_lock
and take it for writing while expanding the vma.  This makes it fairly
straightforward to convert the remaining architectures.

As a result of dropping and re-taking the lock, the calling conventions
for this function have also changed, since the old vma may no longer be
valid.  So it will now return the new vma if successful, and NULL - and
the lock dropped - if the area could not be extended.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[6.1: Patch drivers/iommu/io-pgfault.c instead]
Signed-off-by: Samuel Mendoza-Jonas <samjonas@amazon.com>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-01 13:16:25 +02:00
..
Makefile
cmm.c
dump_pagetables.c s390/mm,ptdump: avoid Kasan vs Memcpy Real markers swapping 2023-03-10 09:33:51 +01:00
extable.c
extmem.c s390/extmem: return correct segment type in __segment_load() 2023-03-10 09:34:04 +01:00
fault.c mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
gmap.c s390: remove vma linked list walks 2022-09-26 19:46:19 -07:00
hugetlbpage.c s390/hugetlb: switch to generic version of follow_huge_pud() 2022-09-11 20:26:01 -07:00
init.c s390/smp: rework absolute lowcore access 2022-09-14 16:46:00 +02:00
kasan_init.c
maccess.c use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
mmap.c treewide: use get_random_u32() when possible 2022-10-11 17:42:58 -06:00
page-states.c
pageattr.c
pgalloc.c
pgtable.c
vmem.c s390/vmem: fix empty page tables cleanup under KASAN 2023-03-10 09:33:00 +01:00