Page MenuHomeFreeBSD

vm_fault: Fix deadlock between vm_map_wire and vm_fault_hold
ClosedPublic

Authored by cse_cem_gmail_com on Apr 27 2015, 10:05 PM.

Details

Reviewers
kib
benno
emaste
Group Reviewers
manpages
Summary

We can't use MAP_ENTRY_IN_TRANSITION / vm_map_unlock_and_wait when we
have a vnode lock held, because it can deadlock as vm_map_wire tries to
fault it in.

Bug discovered by Peter Holm (mmap7 / mmap7a from stress2).

Patch suggested by Attilio Rao.

Test Plan

Run mmap7a test; before this patch, the machine eventually deadlocks.
Characteristically, one thread will be waiting on "vmmaps" and at least one
other thread on "ufs".

After this patch, mmap7a no longer causes this deadlock.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint OK
Unit
No Unit Test Coverage

Event Timeline

cse_cem_gmail_com retitled this revision from to vm_fault: Fix deadlock between vm_map_wire and vm_fault_hold.
cse_cem_gmail_com updated this object.
cse_cem_gmail_com edited the test plan for this revision. (Show Details)
cse_cem_gmail_com added reviewers: benno, kib, emaste.
benno edited edge metadata.
This revision is now accepted and ready to land.Apr 28 2015, 11:45 PM

Committed by @kostikbel in r282128.