linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/mmu_notifier: fix deadlock from typo vm_lock_anon_vma()
@ 2017-08-08 22:57 jglisse
  2017-08-09  6:14 ` Davidlohr Bueso
  0 siblings, 1 reply; 2+ messages in thread
From: jglisse @ 2017-08-08 22:57 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-kernel, Jérôme Glisse, Davidlohr Bueso,
	Andrew Morton

From: JA(C)rA'me Glisse <jglisse@redhat.com>

Fix typo introduced by 0c67e6038580e343bd5af12b7ac6548634f05f0d
which result in dead lock when mm_take_all_locks() is call (only
user being mmu_notifier at this time)

Signed-off-by: JA(C)rA'me Glisse <jglisse@redhat.com>
Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
 mm/mmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/mmap.c b/mm/mmap.c
index 74abfd382478..2d906a8f67ac 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -3314,7 +3314,7 @@ static DEFINE_MUTEX(mm_all_locks_mutex);
 
 static void vm_lock_anon_vma(struct mm_struct *mm, struct anon_vma *anon_vma)
 {
-	if (!test_bit(0, (unsigned long *) &anon_vma->rb_root.rb_root.rb_node)) {
+	if (!test_bit(0, (unsigned long *) &anon_vma->root->rb_root.rb_root.rb_node)) {
 		/*
 		 * The LSB of head.next can't change from under us
 		 * because we hold the mm_all_locks_mutex.
-- 
2.13.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] mm/mmu_notifier: fix deadlock from typo vm_lock_anon_vma()
  2017-08-08 22:57 [PATCH] mm/mmu_notifier: fix deadlock from typo vm_lock_anon_vma() jglisse
@ 2017-08-09  6:14 ` Davidlohr Bueso
  0 siblings, 0 replies; 2+ messages in thread
From: Davidlohr Bueso @ 2017-08-09  6:14 UTC (permalink / raw)
  To: jglisse; +Cc: linux-mm, linux-kernel, Andrew Morton

Thanks!

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2017-08-09  6:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-08 22:57 [PATCH] mm/mmu_notifier: fix deadlock from typo vm_lock_anon_vma() jglisse
2017-08-09  6:14 ` Davidlohr Bueso

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).