kern/52818: vm_fault() calls vput() on shared-locked vnode

Tim Robbins tim at
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
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 30 20:40:13 PDT 2003
>Originator:     Tim Robbins
>Release:        FreeBSD 4.8-RELEASE i386
The FreeBSD Project
FreeBSD 4.8-RELEASE i386
FreeBSD 5.1-BETA i386

vm_fault() calls vput() on a vnode that has been locked with the LK_SHARED

        fs.vp = vnode_pager_lock(fs.first_object);
                if (fs.vp != NULL) {
                        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.




Perhaps we could drop the shared lock then call vrele() instead.

More information about the freebsd-bugs mailing list