Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Feb 2006 23:43:48 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 91350 for review
Message-ID:  <200602072343.k17Nhmqv024323@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=91350

Change 91350 by rwatson@rwatson_zoo on 2006/02/07 23:42:58

	Acquire vnode lock around VOP_GETATTR(), as required by VFS locking
	protocol.  We might simply want to acquire the vnode lock early in
	the record write routine, and hold it throughout, as it's also
	acquired later as part of vn_rdwr().
	
	Found by:	kris (bugmagnet)

Affected files ...

.. //depot/projects/trustedbsd/audit3/sys/security/audit/audit.c#12 edit

Differences ...

==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit.c#12 (text+ko) ====

@@ -284,7 +284,9 @@
 	if (ret)
 		goto out;
 
+	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
 	ret = VOP_GETATTR(vp, &vattr, cred, td);
+	VOP_UNLOCK(vp, 0, td);
 	if (ret)
 		goto out;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602072343.k17Nhmqv024323>