acrn-kernel/drivers
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
..
accessibility
acpi ACPI: sleep: Avoid breaking S3 wakeup due to might_sleep() 2023-06-28 11:12:22 +02:00
amba
android binder: fix UAF of alloc->vma in race with munmap() 2023-05-30 14:03:19 +01:00
ata ata: libata-scsi: Avoid deadlock on rescan after device resume 2023-06-28 11:12:17 +02:00
atm
auxdisplay
base regmap: spi-avmm: Fix regmap_bus max_raw_write 2023-06-28 11:12:26 +02:00
bcma
block null_blk: Fix: memory release when memory_backed=1 2023-06-28 11:12:39 +02:00
bluetooth Bluetooth: hci_qca: fix debugfs registration 2023-06-14 11:15:28 +02:00
bus
cdrom
char tpm_crb: Add support for CRB devices based on Pluton 2023-06-28 11:12:17 +02:00
clk clk: pxa: fix NULL pointer dereference in pxa3xx_clk_update_accr 2023-06-21 16:00:57 +02:00
clocksource
comedi
connector
counter
cpufreq cpufreq: amd-pstate: Add ->fast_switch() callback 2023-06-05 09:26:21 +02:00
cpuidle
crypto crypto: sun8i-ss - Fix a test in sun8i_ss_setup_ivs() 2023-05-17 11:53:40 +02:00
cxl cxl: Wait Memory_Info_Valid before access memory related info 2023-05-30 14:03:32 +01:00
dax
dca
devfreq
dio
dma dmaengine: pl330: rename _start to prevent build error 2023-06-09 10:34:00 +02:00
dma-buf
edac EDAC/qcom: Get rid of hardcoded register offsets 2023-06-21 16:00:51 +02:00
eisa
extcon
firewire
firmware firmware: arm_ffa: Set handle field to zero in memory descriptor 2023-06-14 11:15:31 +02:00
fpga
fsi
gnss
gpio gpiolib: Fix irq_domain resource tracking for gpiochip_irqchip_add_domain() 2023-06-28 11:12:35 +02:00
gpu drm/radeon: fix race condition UAF in radeon_gem_set_domain_ioctl 2023-06-28 11:12:39 +02:00
greybus
hid HID: wacom: Add error check to wacom_parse_and_register() 2023-06-28 11:12:35 +02:00
hsi
hte
hv Drivers: hv: vmbus: Fix vmbus_wait_for_unload() to scan present CPUs 2023-06-28 11:12:23 +02:00
hwmon hwmon: (k10temp) Add PCI ID for family 19, model 78h 2023-06-09 10:34:08 +02:00
hwspinlock
hwtracing coresight: Fix signedness bug in tmc_etr_buf_insert_barrier_packet() 2023-05-30 14:03:22 +01:00
i2c i2c: imx-lpi2c: fix type char overflow issue when calculating the clock cycle 2023-06-28 11:12:40 +02:00
i3c
idle
iio iio: dac: build ad5758 driver when AD5758 is selected 2023-06-09 10:34:19 +02:00
infiniband IB/isert: Fix incorrect release of isert connection 2023-06-21 16:01:00 +02:00
input Input: soc_button_array - add invalid acpi_index DMI quirk handling 2023-06-28 11:12:37 +02:00
interconnect
iommu mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
ipack
irqchip irqchip/gic: Correctly validate OF quirk descriptors 2023-06-21 16:00:54 +02:00
isdn
leds
macintosh
mailbox mailbox: mailbox-test: fix a locking issue in mbox_test_message_write() 2023-06-09 10:34:17 +02:00
mcb mcb-pci: Reallocate memory region to avoid memory overlapping 2023-05-24 17:32:41 +01:00
md dm: don't lock fs when the map is NULL during suspend or resume 2023-06-21 16:01:02 +02:00
media media: cec: core: don't set last_initiator if tx in progress 2023-06-28 11:12:35 +02:00
memory
memstick memstick: r592: Fix UAF bug in r592_remove due to race condition 2023-05-24 17:32:35 +01:00
message scsi: message: mptlan: Fix use after free bug in mptlan_remove() due to race condition 2023-05-24 17:32:37 +01:00
mfd mfd: intel-lpss: Add Intel Meteor Lake PCH-S LPSS PCI IDs 2023-05-24 17:32:42 +01:00
misc eeprom: at24: also select REGMAP 2023-06-14 11:15:32 +02:00
mmc mmc: usdhi60rol0: fix deferred probing 2023-06-28 11:12:31 +02:00
most
mtd mtdchar: mark bits of ioctl handler noinline 2023-06-09 10:34:24 +02:00
mux
net Revert "net: phy: dp83867: perform soft reset and retain established link" 2023-06-28 11:12:33 +02:00
nfc nfcsim.c: Fix error checking for debugfs_create_dir 2023-06-28 11:12:36 +02:00
ntb
nubus
nvdimm
nvme nvme: improve handling of long keep alives 2023-06-28 11:12:36 +02:00
nvmem
of of: overlay: Fix missing of_node_put() in error case of init_overlay_changeset() 2023-06-21 16:00:51 +02:00
opp
parisc parisc: Replace regular spinlock with spin_trylock on panic path 2023-05-24 17:32:42 +01:00
parport
pci PCI: hv: Add a per-bus mutex state_lock 2023-06-28 11:12:24 +02:00
pcmcia
peci
perf
phy phy: qcom-qmp-pcie-msm8996: fix init-count imbalance 2023-06-09 10:34:23 +02:00
pinctrl pinctrl: meson-axg: add missing GPIOA_18 gpio group 2023-06-14 11:15:28 +02:00
platform platform/x86/amd/pmf: Register notify handler only if SPS is enabled 2023-06-28 11:12:34 +02:00
pnp
power power: supply: Fix logic checking if system is running from battery 2023-06-21 16:00:52 +02:00
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator regulator: Fix error checking for debugfs_create_dir 2023-06-21 16:00:52 +02:00
remoteproc remoteproc: imx_dsp_rproc: Fix kernel test robot sparse warning 2023-05-24 17:32:53 +01:00
reset
rpmsg
rtc
s390 s390/cio: unregister device when the only path is gone 2023-06-28 11:12:37 +02:00
sbus
scsi scsi: megaraid_sas: Add flexible array member for SGLs 2023-06-14 11:15:15 +02:00
sh
siox
slimbus
soc qcom: llcc/edac: Fix the base address used for accessing LLCC banks 2023-06-21 16:00:51 +02:00
soundwire soundwire: qcom: add proper error paths in qcom_swrm_startup() 2023-06-28 11:12:38 +02:00
spi spi: lpspi: disable lpspi module irq in DMA mode 2023-06-28 11:12:37 +02:00
spmi
ssb
staging Revert "staging: rtl8192e: Replace macro RTL_PCI_DEVICE with PCI_DEVICE" 2023-06-14 11:15:34 +02:00
target scsi: target: iscsi: Prevent login threads from racing between each other 2023-06-28 11:12:35 +02:00
tc
tee tee: amdtee: Add return_origin to 'struct tee_cmd_load_ta' 2023-06-14 11:15:28 +02:00
thermal
thunderbolt thunderbolt: Mask ring interrupt on Intel hardware as well 2023-06-21 16:00:56 +02:00
tty tty: serial: fsl_lpuart: reduce RX watermark to 0 on LS1028A 2023-06-28 11:12:17 +02:00
ufs scsi: ufs: ufs-pci: Add support for Intel Lunar Lake 2023-05-24 17:32:37 +01:00
uio
usb usb: gadget: udc: fix NULL dereference in remove() 2023-06-28 11:12:36 +02:00
vdpa vduse: avoid empty string for dev name 2023-06-14 11:15:32 +02:00
vfio vfio/type1: check pfn valid before converting to struct page 2023-06-05 09:26:19 +02:00
vhost vhost_net: revert upend_idx only on retriable error 2023-06-28 11:12:40 +02:00
video fbcon: Fix null-ptr-deref in soft_cursor 2023-06-09 10:34:26 +02:00
virt
virtio
vlynq
w1
watchdog watchdog: menz069_wdt: fix watchdog initialisation 2023-06-09 10:34:07 +02:00
xen xen/pvcalls-back: fix double frees with pvcalls_new_active_socket() 2023-05-30 14:03:32 +01:00
zorro
Kconfig
Makefile