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.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 11:26 AM
Unknown Object (File)
Fri, Nov 22, 4:11 AM
Unknown Object (File)
Nov 18 2024, 10:53 AM
Unknown Object (File)
Nov 17 2024, 6:29 PM
Unknown Object (File)
Nov 17 2024, 5:34 PM
Unknown Object (File)
Nov 17 2024, 3:46 PM
Unknown Object (File)
Sep 26 2024, 12:03 AM
Unknown Object (File)
Sep 15 2024, 5:12 PM
Subscribers

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 - subversion
Lint
Lint Passed
Unit
No 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.