mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
xfs: filter out obviously bad btree pointers
Don't let anybody load an obviously bad btree pointer. Since the values come from disk, we must return an error, not just ASSERT. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Eric Sandeen <sandeen@redhat.com>
This commit is contained in:
parent
7a652bbe36
commit
d5a91baeb6
3 changed files with 4 additions and 6 deletions
|
@ -826,7 +826,8 @@ xfs_btree_read_bufl(
|
|||
xfs_daddr_t d; /* real disk block address */
|
||||
int error;
|
||||
|
||||
ASSERT(fsbno != NULLFSBLOCK);
|
||||
if (!XFS_FSB_SANITY_CHECK(mp, fsbno))
|
||||
return -EFSCORRUPTED;
|
||||
d = XFS_FSB_TO_DADDR(mp, fsbno);
|
||||
error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp, d,
|
||||
mp->m_bsize, lock, &bp, ops);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue