mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-04-13 09:59:31 +00:00
xfs: validate inumber in xfs_iget
Actually use the inumber validator to check the argument passed in here. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com>
This commit is contained in:
parent
398597c3ef
commit
05aba1953f
1 changed files with 1 additions and 1 deletions
|
@ -755,7 +755,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);
|
||||
|
|
Loading…
Add table
Reference in a new issue