summaryrefslogtreecommitdiffstats
path: root/sys/gnu
diff options
context:
space:
mode:
authordumbbell <dumbbell@FreeBSD.org>2005-10-21 09:15:26 +0000
committerdumbbell <dumbbell@FreeBSD.org>2005-10-21 09:15:26 +0000
commitbfe362635801ae606d60b919f7e7195604f8b661 (patch)
tree1f01ffdb5b17a8191596708900c5390c6ea3a960 /sys/gnu
parent2c640d0fffd0c9c410cb28dcfadba598bd552012 (diff)
downloadFreeBSD-src-bfe362635801ae606d60b919f7e7195604f8b661.zip
FreeBSD-src-bfe362635801ae606d60b919f7e7195604f8b661.tar.gz
Apply the same fix to a potential race in the ISDOTDOT code
in reiserfs_lookup() that was used to fix an actual race in ufs_lookup.c:1.78. This is not currently a hazard, but the bug would be activated by marking reiserfs as MPSAFE. Reviewed by: mux (mentor) MFC after: 2 weeks
Diffstat (limited to 'sys/gnu')
-rw-r--r--sys/gnu/fs/reiserfs/reiserfs_namei.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/gnu/fs/reiserfs/reiserfs_namei.c b/sys/gnu/fs/reiserfs/reiserfs_namei.c
index 6234d1f..6ab714a 100644
--- a/sys/gnu/fs/reiserfs/reiserfs_namei.c
+++ b/sys/gnu/fs/reiserfs/reiserfs_namei.c
@@ -30,6 +30,7 @@ reiserfs_lookup(struct vop_cachedlookup_args *ap)
int flags = cnp->cn_flags;
struct thread *td = cnp->cn_thread;
+ struct cpu_key *saved_ino;
struct vnode *vp;
struct vnode *pdp; /* Saved dp during symlink work */
@@ -77,9 +78,10 @@ reiserfs_lookup(struct vop_cachedlookup_args *ap)
reiserfs_log(LOG_DEBUG, "reading vnode\n");
pdp = vdp;
if (flags & ISDOTDOT) {
+ saved_ino = (struct cpu_key *)&(de.de_dir_id);
VOP_UNLOCK(pdp, 0, td);
error = reiserfs_iget(vdp->v_mount,
- (struct cpu_key *)&(de.de_dir_id), &vp, td);
+ saved_ino, &vp, td);
vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY, td);
if (error != 0)
return (error);
OpenPOWER on IntegriCloud