Re: [PATCH] xfs: initialize error in xfs_getfsmap_rtdev_rtbitmap()

From: Carlos Maiolino

Date: Thu Nov 26 2026 - 08:49:23 EST


On Thu, 19 Nov 2026 09:04:49 -0800, Ian Rogers wrote:
> When xfs_getfsmap_rtdev_rtbitmap() was converted to iterate over realtime
> groups with xfs_rtgroup_next_range(), 'error' was left uninitialized. If a
> continuation or range-bounded FS_IOC_GETFSMAP query has start_rgno >
> end_rgno (for example when keys[0].fmr_physical + keys[0].fmr_length lies
> in a higher realtime group than keys[1].fmr_physical while both remain
> below eofs), the while loop executes zero iterations and returns the
> uninitialized stack variable 'error' directly to userspace as the ioctl()
> return value.
>
> [...]

Applied to for-next, thanks!

[1/1] xfs: initialize error in xfs_getfsmap_rtdev_rtbitmap()
commit: c43e28d4f2d2000777478a5b87946bba65c3dfdd

Best regards,
--
Carlos Maiolino <cem@xxxxxxxxxx>