Searched hist:af8c53c8 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/fs/ext4/ |
H A D | fsmap.c | af8c53c8 Thu Oct 01 17:21:48 CDT 2020 Darrick J. Wong <darrick.wong@oracle.com> ext4: limit entries returned when counting fsmap records
If userspace asked fsmap to try 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: 0c9ec4beecac ("ext4: support GETFSMAP ioctls") Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Link: https://lore.kernel.org/r/20201001222148.GA49520@magnolia Signed-off-by: Theodore Ts'o <tytso@mit.edu> af8c53c8 Thu Oct 01 17:21:48 CDT 2020 Darrick J. Wong <darrick.wong@oracle.com> ext4: limit entries returned when counting fsmap records If userspace asked fsmap to try 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: 0c9ec4beecac ("ext4: support GETFSMAP ioctls") Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Link: https://lore.kernel.org/r/20201001222148.GA49520@magnolia Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|