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:
Bruce Evans 2002-10-18 21:41:41 +00:00
parent 1a6b414672
commit eb5b0bc42e
2 changed files with 2 additions and 2 deletions

View File

@ -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.

View File

@ -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.