Skip to content
Commit 8361852a authored by Darrick J. Wong's avatar Darrick J. Wong Committed by bgman111111
Browse files

xfs: limit entries returned when counting fsmap records



[ Upstream commit acd1ac3aa22fd58803a12d26b1ab7f70232f8d8d ]

If userspace asked fsmap to count the number of entries, we cannot
return more than UINT_MAX entries because fmh_entries is u32.
Therefore, stop counting if we hit this limit or else we will waste time
to return truncated results.

Fixes: e89c0413 ("xfs: implement the GETFSMAP ioctl")
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarChandan Babu R <chandanrlinux@gmail.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 5dd28b54
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment