linux/arch
Linus Torvalds 8d7071af89 mm: always expand the stack with the mmap write lock held
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.

Tested-by: Vegard Nossum <vegard.nossum@oracle.com>
Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> # ia64
Tested-by: Frank Scheiner <frank.scheiner@web.de> # ia64
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2023-06-27 09:41:30 -07:00
..
alpha mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-06-24 14:12:58 -07:00
arc mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-06-24 14:12:58 -07:00
arm arm/mm: Convert to using lock_mm_and_find_vma() 2023-06-24 14:12:58 -07:00
arm64 arm64/mm: Convert to using lock_mm_and_find_vma() 2023-06-24 14:12:58 -07:00
csky mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-06-24 14:12:58 -07:00
hexagon mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-06-24 14:12:58 -07:00
ia64 mm: always expand the stack with the mmap write lock held 2023-06-27 09:41:30 -07:00
loongarch mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-06-24 14:12:58 -07:00
m68k mm: always expand the stack with the mmap write lock held 2023-06-27 09:41:30 -07:00
microblaze mm: always expand the stack with the mmap write lock held 2023-06-27 09:41:30 -07:00
mips mips/mm: Convert to using lock_mm_and_find_vma() 2023-06-24 14:12:58 -07:00
nios2 mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-06-24 14:12:58 -07:00
openrisc mm: always expand the stack with the mmap write lock held 2023-06-27 09:41:30 -07:00
parisc mm: always expand the stack with the mmap write lock held 2023-06-27 09:41:30 -07:00
powerpc powerpc/mm: convert coprocessor fault to lock_mm_and_find_vma() 2023-06-24 14:12:58 -07:00
riscv riscv/mm: Convert to using lock_mm_and_find_vma() 2023-06-24 14:12:58 -07:00
s390 mm: always expand the stack with the mmap write lock held 2023-06-27 09:41:30 -07:00
sh mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-06-24 14:12:58 -07:00
sparc mm: always expand the stack with the mmap write lock held 2023-06-27 09:41:30 -07:00
um mm: always expand the stack with the mmap write lock held 2023-06-27 09:41:30 -07:00
x86 mm: introduce new 'lock_mm_and_find_vma()' page fault helper 2023-06-24 14:12:54 -07:00
xtensa mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-06-24 14:12:58 -07:00
.gitignore
Kconfig