kern/52818: vm_fault() calls vput() on shared-locked vnode
Tim Robbins
tim at robbins.dropbear.id.au
Fri May 30 20:40:15 PDT 2003
>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:
More information about the freebsd-bugs
mailing list