Submitted by: Luoqi Chen <luoqi@watermarkgroup.com>
Unlock vnode before messing with map to avoid deadlock between map and vnode ( e.g. with exec_map and underlying program binary vnode ). Solves a deadlock that most often occurs during a large -j# buildworld reported by three people.
This commit is contained in:
parent
7dd38e558a
commit
b33fb764f1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=44098
@ -66,7 +66,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: vm_fault.c,v 1.98 1999/01/24 06:04:52 dillon Exp $
|
||||
* $Id: vm_fault.c,v 1.99 1999/02/07 21:48:21 dillon Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -697,6 +697,17 @@ RetryFault:;
|
||||
* page fault on them.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Unlock vnode before the lookup to avoid deadlock. E.G.
|
||||
* avoid a deadlock between the inode and exec_map that can
|
||||
* occur due to locks being obtained in different orders.
|
||||
*/
|
||||
|
||||
if (fs.vp != NULL) {
|
||||
vput(fs.vp);
|
||||
fs.vp = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* To avoid trying to write_lock the map while another process
|
||||
* has it read_locked (in vm_map_pageable), we do not try for
|
||||
|
Loading…
Reference in New Issue
Block a user