[PATCH 0/3] XFS error handling fixes

2025-01-23 Thread Egor Ignatov
This patchset fixes several issues with error handling in xfs module. Egor Ignatov (3): fs/xfs: Handle root inode read failure in grub_xfs_mount fs/xfs: Fix grub_xfs_iterate_dir return value in case of failure fs/xfs: Propagate incorrect inode error from grub_xfs_read_inode grub-core/fs/xf

[PATCH 3/3] fs/xfs: Propagate incorrect inode error from grub_xfs_read_inode

2025-01-23 Thread Egor Ignatov
The incorrect inode error from grub_xfs_read_inode did not propagate because grub_print_error() resetted grub_errno, and grub_xfs_iterate_dir() did not handle it at all. Signed-off-by: Egor Ignatov --- grub-core/fs/xfs.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff

[PATCH 1/3] fs/xfs: Handle root inode read failure in grub_xfs_mount

2025-01-23 Thread Egor Ignatov
Signed-off-by: Egor Ignatov --- grub-core/fs/xfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/grub-core/fs/xfs.c b/grub-core/fs/xfs.c index 8e02ab4a30..7c903f01a3 100644 --- a/grub-core/fs/xfs.c +++ b/grub-core/fs/xfs.c @@ -1053,6 +1053,8 @@ grub_xfs_mount (grub_disk_t disk)

[PATCH 2/3] fs/xfs: Fix grub_xfs_iterate_dir return value in case of failure

2025-01-23 Thread Egor Ignatov
Commit ef7850c757 introduced multiple boundary checks in grub_xfs_iterate_dir() but handled the error incorrectly returning error code instead of 0. Also change the error message so that it doesn't match the message in grub_xfs_read_inode(). Fixes: ef7850c757 (fs/xfs: Fix issues found while fuzzi