From owner-freebsd-bugs Wed Oct 28 07:40:10 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA11651 for freebsd-bugs-outgoing; Wed, 28 Oct 1998 07:40:10 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA11631 for ; Wed, 28 Oct 1998 07:40:05 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id HAA02145; Wed, 28 Oct 1998 07:40:00 -0800 (PST) Date: Wed, 28 Oct 1998 07:40:00 -0800 (PST) Message-Id: <199810281540.HAA02145@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.ORG From: Luoqi Chen Subject: Re: kern/8416: vm_fault might deadlock when locking backing store vnode Reply-To: Luoqi Chen Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR kern/8416; it has been noted by GNATS. From: Luoqi Chen 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