]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC: r212443
authorrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 27 Sep 2010 02:30:56 +0000 (02:30 +0000)
committerrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 27 Sep 2010 02:30:56 +0000 (02:30 +0000)
commit468e1bfa3771d25da847239f0d6e47f240e9fb1b
tree1dd33d28c42621212cc9dd690185949e01811c88
parentc23702216099fb4778b38fc2bff7e2addf678117
MFC: r212443
This patch applies one of the two fixes suggested by
zack.kirsch at isilon.com for a race between nfsrv_freeopen()
and nfsrv_getlockfile() in the experimental NFS server that
he found during testing. Although nfsrv_freeopen() holds a
sleep lock on the lock file structure when called with
cansleep != 0, nfsrv_getlockfile() could still search the
list, once it acquired the NFSLOCKSTATE() mutex. I believe
that acquiring the mutex in nfsrv_freeopen() fixes the race.

git-svn-id: svn://svn.freebsd.org/base/stable/8@213191 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/fs/nfsserver/nfs_nfsdstate.c