summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2005-10-12 14:18:58 +0000
committerrwatson <rwatson@FreeBSD.org>2005-10-12 14:18:58 +0000
commit208e5f238a36652c2e612694191823a79d0046ab (patch)
treedd012670cea8a0a1e55a9f8c09490a0bd4bb70ef /sys
parent79a0c1cf7aaa16e8981be15cb6c31493d0df06ab (diff)
downloadFreeBSD-src-208e5f238a36652c2e612694191823a79d0046ab.zip
FreeBSD-src-208e5f238a36652c2e612694191823a79d0046ab.tar.gz
When performing a VOP_LOOKUP() as part of UFS1 extended attribute
auto-start, set cnp.cn_lkflags to LK_EXCLUSIVE. This flag must now be set so that lockmgr knows what kind of lock to acquire, and it will panic if not specified. This resulted in a panic when using extended attributes on UFS1 as of locking work present in the 6.x branch. This is a RELENG_6_0 merge candidate. Reported by: lofi MFC after: 3 days
Diffstat (limited to 'sys')
-rw-r--r--sys/ufs/ufs/ufs_extattr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/ufs/ufs/ufs_extattr.c b/sys/ufs/ufs/ufs_extattr.c
index 273a8e2..59b15b1 100644
--- a/sys/ufs/ufs/ufs_extattr.c
+++ b/sys/ufs/ufs/ufs_extattr.c
@@ -251,6 +251,7 @@ ufs_extattr_lookup(struct vnode *start_dvp, int lockparent, char *dirname,
cnp.cn_flags = ISLASTCN;
if (lockparent == UE_GETDIR_LOCKPARENT)
cnp.cn_flags |= LOCKPARENT;
+ cnp.cn_lkflags = LK_EXCLUSIVE;
cnp.cn_thread = td;
cnp.cn_cred = td->td_ucred;
cnp.cn_pnbuf = uma_zalloc(namei_zone, M_WAITOK);
OpenPOWER on IntegriCloud