xfs: fix quotacheck dquot id overflow infinite loop
authorBrian Foster <bfoster@redhat.com>
Mon, 24 Jul 2017 15:33:25 +0000 (08:33 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 24 Jul 2017 15:33:25 +0000 (08:33 -0700)
commitcfaf2d034360166e569a4929dd83ae9698bed856
treecc5ce3e05fd30ba3737fe59c03fc061876c08300
parent10479e2dea83d4c421ad05dfc55d918aa8dfc0cd
xfs: fix quotacheck dquot id overflow infinite loop

If a dquot has an id of U32_MAX, the next lookup index increment
overflows the uint32_t back to 0. This starts the lookup sequence
over from the beginning, repeats indefinitely and results in a
livelock.

Update xfs_qm_dquot_walk() to explicitly check for the lookup
overflow and exit the loop.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_qm.c