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
This commit is contained in:
@@ -474,7 +474,6 @@ ext2_lookup(ap)
|
||||
*/
|
||||
dp->i_ino = ep->inode;
|
||||
dp->i_reclen = ep->rec_len;
|
||||
brelse(bp);
|
||||
goto found;
|
||||
}
|
||||
}
|
||||
@@ -569,6 +568,7 @@ ext2_lookup(ap)
|
||||
dp->i_size = entryoffsetinblock+EXT2_DIR_REC_LEN(ep->name_len);
|
||||
dp->i_flag |= IN_CHANGE | IN_UPDATE;
|
||||
}
|
||||
brelse(bp);
|
||||
|
||||
/*
|
||||
* Found component in pathname.
|
||||
|
||||
@@ -474,7 +474,6 @@ ext2_lookup(ap)
|
||||
*/
|
||||
dp->i_ino = ep->inode;
|
||||
dp->i_reclen = ep->rec_len;
|
||||
brelse(bp);
|
||||
goto found;
|
||||
}
|
||||
}
|
||||
@@ -569,6 +568,7 @@ ext2_lookup(ap)
|
||||
dp->i_size = entryoffsetinblock+EXT2_DIR_REC_LEN(ep->name_len);
|
||||
dp->i_flag |= IN_CHANGE | IN_UPDATE;
|
||||
}
|
||||
brelse(bp);
|
||||
|
||||
/*
|
||||
* Found component in pathname.
|
||||
|
||||
Reference in New Issue
Block a user