linux-stable/arch/s390
Linus Torvalds 5f50096f0a 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.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-01 13:14:46 +02:00
..
appldata
boot s390/mm: fix direct map accounting 2023-05-17 14:02:08 +02:00
configs s390: update defconfigs 2023-03-13 09:15:11 +01:00
crypto s390/crypto: use vector instructions only if available for ChaCha20 2023-05-24 17:30:24 +01:00
hypfs
include s390/mm: fix direct map accounting 2023-05-17 14:02:08 +02:00
kernel s390/ipl: fix IPIB virtual vs physical address confusion 2023-06-09 10:48:06 +02:00
kvm KVM: s390: pv: fix asynchronous teardown for small VMs 2023-05-17 14:01:46 +02:00
lib s390/uaccess: add missing earlyclobber annotations to __clear_user() 2023-03-27 17:23:08 +02:00
mm mm: always expand the stack with the mmap write lock held 2023-07-01 13:14:46 +02:00
net s390/bpf: Fix bpf_arch_text_poke() with new_addr == NULL 2023-04-14 18:28:52 +02:00
pci PCI: s390: Fix use-after-free of PCI resources with per-function hotplug 2023-03-13 09:15:11 +01:00
purgatory s390/purgatory: disable branch profiling 2023-06-28 11:14:22 +02:00
tools
Kbuild
Kconfig s390/checksum: always use cksm instruction 2023-05-11 23:17:32 +09:00
Kconfig.debug
Makefile s390: reintroduce expoline dependence to scripts 2023-03-27 17:23:08 +02:00