linux-stable/arch/riscv/mm
Suren Baghdasaryan 4089eef0e6 mm: drop per-VMA lock when returning VM_FAULT_RETRY or VM_FAULT_COMPLETED
handle_mm_fault returning VM_FAULT_RETRY or VM_FAULT_COMPLETED means
mmap_lock has been released.  However with per-VMA locks behavior is
different and the caller should still release it.  To make the rules
consistent for the caller, drop the per-VMA lock when returning
VM_FAULT_RETRY or VM_FAULT_COMPLETED.  Currently the only path returning
VM_FAULT_RETRY under per-VMA locks is do_swap_page and no path returns
VM_FAULT_COMPLETED for now.

[willy@infradead.org: fix riscv]
  Link: https://lkml.kernel.org/r/CAJuCfpE6GWEx1rPBmNpUfoD5o-gNFz9-UFywzCE2PbEGBiVz7g@mail.gmail.com
Link: https://lkml.kernel.org/r/20230630211957.1341547-4-surenb@google.com
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Acked-by: Peter Xu <peterx@redhat.com>
Tested-by: Conor Dooley <conor.dooley@microchip.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: David Hildenbrand <david@redhat.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Hillf Danton <hdanton@sina.com>
Cc: "Huang, Ying" <ying.huang@intel.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Josef Bacik <josef@toxicpanda.com>
Cc: Laurent Dufour <ldufour@linux.ibm.com>
Cc: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Lorenzo Stoakes <lstoakes@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Michel Lespinasse <michel@lespinasse.org>
Cc: Minchan Kim <minchan@google.com>
Cc: Pavel Tatashin <pasha.tatashin@soleen.com>
Cc: Punit Agrawal <punit.agrawal@bytedance.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Yu Zhao <yuzhao@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-08-24 16:20:17 -07:00
..
cacheflush.c riscv: mm: mark CBO relate initialization funcs as __init 2023-07-06 10:32:04 -07:00
context.c riscv: mm: Fix incorrect ASID argument when flushing TLB 2023-03-21 15:55:19 -07:00
dma-noncoherent.c riscv: mm: mark noncoherent_supported as __ro_after_init 2023-07-06 10:32:05 -07:00
extable.c riscv: extable: fix err reg writing in dedicated uaccess handler 2022-02-08 17:02:47 -08:00
fault.c mm: drop per-VMA lock when returning VM_FAULT_RETRY or VM_FAULT_COMPLETED 2023-08-24 16:20:17 -07:00
hugetlbpage.c mm: riscv: fix an unsafe pte read in huge_pte_alloc() 2023-07-05 07:24:17 -07:00
init.c riscv: convert alloc_{pmd, pte}_late() to use ptdescs 2023-08-21 13:37:57 -07:00
kasan_init.c riscv: Rework kasan population functions 2023-04-19 07:24:50 -07:00
Makefile riscv: mm: stub extable related functions/macros for !MMU 2023-06-14 07:17:45 -07:00
pageattr.c mm: enable page walking API to lock vmas during the walk 2023-08-21 13:07:20 -07:00
pgtable.c riscv: mm: Implement pmdp_collapse_flush for THP 2023-02-01 20:52:09 -08:00
physaddr.c riscv: Use PUD/P4D/PGD pages for the linear mapping 2023-04-18 20:43:04 -07:00
pmem.c RISC-V: Implement arch specific PMEM APIs 2022-12-08 15:43:59 -08:00
ptdump.c riscv: Fix ptdump when KASAN is enabled 2023-04-19 07:24:53 -07:00
tlbflush.c RISC-V: Use IPIs for remote TLB flush when possible 2023-04-08 11:26:24 +01:00