Date: Wed, 28 Oct 1998 07:40:00 -0800 (PST) From: Luoqi Chen <luoqi@watermarkgroup.com> To: freebsd-bugs@FreeBSD.ORG Subject: Re: kern/8416: vm_fault might deadlock when locking backing store vnode Message-ID: <199810281540.HAA02145@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/8416; it has been noted by GNATS.
From: Luoqi Chen <luoqi@watermarkgroup.com>
To: freebsd-gnats-submit@freebsd.org, tegge@not.fast.no
Cc: dg@freebsd.org
Subject: Re: kern/8416: vm_fault might deadlock when locking backing store vnode
Date: Wed, 28 Oct 1998 10:33:00 -0500 (EST)
I have seen the same problem once. It's a deadlock caused by vm_fault()
trying to lock vm map and vnode in the wrong order. For detail, you may
look up my original message in -current archive searching for "deadlock".
There's fix in that message, which I will reproduce here too. Tor, would
you review it for me?
-lq
Index: vm_fault.c
===================================================================
RCS file: /home/ncvs/src/sys/vm/vm_fault.c,v
retrieving revision 1.88
diff -u -r1.88 vm_fault.c
--- vm_fault.c 1998/09/04 08:06:57 1.88
+++ vm_fault.c 1998/09/23 21:54:14
@@ -656,6 +656,14 @@
*/
/*
+ * Unlock vnode before the lookup to avoid deadlock
+ */
+ 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
* write permission. If the page is still writable, we will
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810281540.HAA02145>
