xfs: validate inumber in xfs_iget
PATCH 1/1 xfs: validate inumber in xfs_iget
From: Darrick J. Wong <[email protected]>
Actually use the inumber validator to check the argument passed in here.
Signed-off-by Darrick J. Wong <[email protected]>
--- fs/xfs/xfs_icache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_icache.c +1 -1
@@ -754,7 +754,7 @@ xfs_iget(ASSERT ((lock_flags & (XFS_IOLOCK_EXCL |XFS_IOLOCK_SHARED )) ==0 );/* reject inode numbers outside existing AGs */ -if (!ino ||XFS_INO_TO_AGNO (mp, ino) >= mp->m_sb.sb_agcount) +if (!xfs_verify_ino (mp, ino))return -EINVAL ;XFS_STATS_INC (mp, xs_ig_attempts);
Looks good:
Reviewed-by Christoph Hellwig <[email protected]>
Quoted 5 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
Actually use the inumber validator to check the argument passed in here.
Signed-off-by Darrick J. Wong <[email protected]>
looks good.
Reviewed-by Dave Chinner <[email protected]>
Signature · 2 lines
Dave Chinner [email protected]