summaryrefslogtreecommitdiffstats
path: root/sys/gnu/ext2fs
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2002-10-18 21:41:41 +0000
committerbde <bde@FreeBSD.org>2002-10-18 21:41:41 +0000
commit1bac0e0b4c757dd560b18b70ad1a3a28028cf233 (patch)
tree8227525e1ae65cb6b5ed3cc9e55ec0a3247fa95c /sys/gnu/ext2fs
parentb9279f6877f2b6973359a4c2620abacf9fe78d21 (diff)
downloadFreeBSD-src-1bac0e0b4c757dd560b18b70ad1a3a28028cf233.zip
FreeBSD-src-1bac0e0b4c757dd560b18b70ad1a3a28028cf233.tar.gz
MFufs 1.33:
In the 'found' case for ext2_lookup() the underlying bp's data was being accessed after the bp had been releaed. A simple move of the brelse() solves the problem. The PR reports that this caused panics running the GDB testsuite unless NO_GEOM is configured. PR: 44060 Reported by: Mark Kettenis <kettenis@chello.nl> MFC after: 3 days
Diffstat (limited to 'sys/gnu/ext2fs')
-rw-r--r--sys/gnu/ext2fs/ext2_lookup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/gnu/ext2fs/ext2_lookup.c b/sys/gnu/ext2fs/ext2_lookup.c
index bddc3bb..49caccf 100644
--- a/sys/gnu/ext2fs/ext2_lookup.c
+++ b/sys/gnu/ext2fs/ext2_lookup.c
@@ -474,7 +474,6 @@ searchloop:
*/
dp->i_ino = ep->inode;
dp->i_reclen = ep->rec_len;
- brelse(bp);
goto found;
}
}
@@ -569,6 +568,7 @@ found:
dp->i_size = entryoffsetinblock+EXT2_DIR_REC_LEN(ep->name_len);
dp->i_flag |= IN_CHANGE | IN_UPDATE;
}
+ brelse(bp);
/*
* Found component in pathname.
OpenPOWER on IntegriCloud