linux-stable/include
Rik van Riel 257931b5d8 hugetlbfs: extend hugetlb_vma_lock to private VMAs
commit bf4916922c upstream.

Extend the locking scheme used to protect shared hugetlb mappings from
truncate vs page fault races, in order to protect private hugetlb mappings
(with resv_map) against MADV_DONTNEED.

Add a read-write semaphore to the resv_map data structure, and use that
from the hugetlb_vma_(un)lock_* functions, in preparation for closing the
race between MADV_DONTNEED and page faults.

Link: https://lkml.kernel.org/r/20231006040020.3677377-3-riel@surriel.com
Fixes: 04ada095dc ("hugetlb: don't delete vma_lock in hugetlb MADV_DONTNEED processing")
Signed-off-by: Rik van Riel <riel@surriel.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-11-02 09:36:48 +01:00
..
acpi
asm-generic hyperv-fixes for 6.5-rc5 2023-08-04 17:16:14 -07:00
clocksource
crypto crypto: api - Use work queue in crypto_destroy_instance 2023-09-13 09:53:05 +02:00
drm drm/tests: helpers: Avoid a driver uaf 2023-09-23 11:14:38 +02:00
dt-bindings dt-bindings: clock: qcom,gcc-sc8280xp: Add missing GDSCs 2023-09-13 09:53:27 +02:00
keys
kunit
kvm
linux hugetlbfs: extend hugetlb_vma_lock to private VMAs 2023-11-02 09:36:48 +01:00
math-emu
media media: cec: core: add adap_unconfigured() callback 2023-09-13 09:53:40 +02:00
memory
misc
net Bluetooth: hci_sock: Correctly bounds check and pad HCI_MON_NEW_INDEX name 2023-10-25 12:16:30 +02:00
pcmcia
ras
rdma
rv
scsi scsi: Do not attempt to rescan suspended devices 2023-10-10 22:02:54 +02:00
soc
sound ALSA: ump: Don't create unused substreams for static blocks 2023-09-13 09:53:27 +02:00
target
trace neighbor: tracing: Move pin6 inside CONFIG_IPV6=y section 2023-10-25 12:16:15 +02:00
uapi af_packet: Fix fortified memcpy() without flex array. 2023-10-19 23:11:01 +02:00
ufs scsi: ufs: Fix residual handling 2023-09-13 09:53:36 +02:00
vdso
video fbdev: kyro: Remove unused declarations 2023-08-15 23:39:33 +02:00
xen