Skip to contentSkip to conversation

mm/mmu_notifier: fix deadlock from typo vm_lock_anon_vma()

PATCH In review [email protected] 2 participants 2 messages Aug 8, 2017 – Aug 9, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm/mmu_notifier: fix deadlock from typo vm_lock_anon_vma()

From: Jérôme Glisse <[email protected]>

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)

Cc Davidlohr Bueso <[email protected]>
Cc Andrew Morton <[email protected]>
---
 mm/mmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/mmap.c +1 -1
index 74abfd382478..2d906a8f67ac 100644
@@ -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.
Signature · 1 line
2.13.4