Date: Sat, 31 May 2003 13:30:57 +1000 (EST) From: Tim Robbins <tim@robbins.dropbear.id.au> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/52818: vm_fault() calls vput() on shared-locked vnode Message-ID: <20030531033057.147BCB4CD@dilbert.robbins.dropbear.id.au> Resent-Message-ID: <200305310340.h4V3eDT3013254@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 52818
>Category: kern
>Synopsis: vm_fault() calls vput() on shared-locked vnode
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri May 30 20:40:13 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Tim Robbins
>Release: FreeBSD 4.8-RELEASE i386
>Organization:
The FreeBSD Project
>Environment:
FreeBSD 4.8-RELEASE i386
FreeBSD 5.1-BETA i386
>Description:
vm_fault() calls vput() on a vnode that has been locked with the LK_SHARED
flag:
fs.vp = vnode_pager_lock(fs.first_object);
...
if (fs.vp != NULL) {
vput(fs.vp);
fs.vp = NULL;
}
This is bad because it means that VOP_INACTIVE is called while holding
a shared lock, instead of an exclusive lock.
This may be related to kern/52412.
>How-To-Repeat:
N/A
>Fix:
Perhaps we could drop the shared lock then call vrele() instead.
>Release-Note:
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030531033057.147BCB4CD>
