linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] mm/nommu: remove unnecessary VMA locking
@ 2023-03-01 19:04 Suren Baghdasaryan
  2023-03-02  9:41 ` David Hildenbrand
  0 siblings, 1 reply; 5+ messages in thread
From: Suren Baghdasaryan @ 2023-03-01 19:04 UTC (permalink / raw)
  To: akpm
  Cc: michel, joelaf, songliubraving, mhocko, leewalsh, david, peterz,
	bigeasy, peterx, dhowells, linux-mm, edumazet, jglisse,
	punit.agrawal, Hyeonggon Yoo, will, arjunroy, chriscli, dave,
	minchan, x86, hughd, willy, gurua, mingo, linux-arm-kernel,
	rientjes, axelrasmussen, kernel-team, michalechner92, soheil,
	paulmck, jannh, liam.howlett, shakeelb, luto, gthelen, ldufour,
	Suren Baghdasaryan, vbabka, posk, lstoakes, peterjung1337,
	linuxppc-dev, kent.overstreet

Since CONFIG_PER_VMA_LOCK depends on CONFIG_MMU, the changes in nommu
are not needed. Remove them.

Fixes: bad94decd6a4 ("mm: write-lock VMAs before removing them from VMA tree")
Reported-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Link: https://lore.kernel.org/all/Y%2F8CJQGNuMUTdLwP@localhost/
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
---
Fix cleanly applies over mm-unstable, SHA in "Fixes" is from that tree.

 mm/nommu.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/mm/nommu.c b/mm/nommu.c
index 2ab162d773e2..57ba243c6a37 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -588,7 +588,6 @@ static int delete_vma_from_mm(struct vm_area_struct *vma)
 		       current->pid);
 		return -ENOMEM;
 	}
-	vma_start_write(vma);
 	cleanup_vma_from_mm(vma);
 
 	/* remove from the MM's tree and list */
@@ -1520,10 +1519,6 @@ void exit_mmap(struct mm_struct *mm)
 	 */
 	mmap_write_lock(mm);
 	for_each_vma(vmi, vma) {
-		/*
-		 * No need to lock VMA because this is the only mm user and no
-		 * page fault handled can race with it.
-		 */
 		cleanup_vma_from_mm(vma);
 		delete_vma(mm, vma);
 		cond_resched();
-- 
2.40.0.rc0.216.gc4246ad0f0-goog


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-03 16:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-01 19:04 [PATCH 1/1] mm/nommu: remove unnecessary VMA locking Suren Baghdasaryan
2023-03-02  9:41 ` David Hildenbrand
2023-03-03  1:34   ` Suren Baghdasaryan
2023-03-03  9:05     ` David Hildenbrand
2023-03-03 16:14       ` Suren Baghdasaryan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).