File: fs-xfs-Handle-root-inode-read-failure-in-grub_xfs_mount.patch

package info (click to toggle)
grub2 2.14~git20250718.0e36779-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 60,688 kB
  • sloc: ansic: 541,811; asm: 68,074; sh: 9,803; cpp: 2,095; makefile: 1,895; python: 1,518; sed: 446; lex: 393; yacc: 268; awk: 85; lisp: 54; perl: 31
file content (22 lines) | stat: -rw-r--r-- 633 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From: Egor Ignatov <egori@altlinux.org>
Date: Thu, 23 Jan 2025 20:44:13 +0300
Subject: fs/xfs: Handle root inode read failure in grub_xfs_mount

Signed-off-by: Egor Ignatov <egori@altlinux.org>
---
 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 0fb7d80..776efed 100644
--- a/grub-core/fs/xfs.c
+++ b/grub-core/fs/xfs.c
@@ -1111,6 +1111,8 @@ grub_xfs_mount (grub_disk_t disk)
 	       grub_cpu_to_be64(data->sblock.rootino));
 
   grub_xfs_read_inode (data, data->diropen.ino, &data->diropen.inode);
+  if (grub_errno)
+    goto fail;
 
   return data;
  fail: