]> git.ipfire.org Git - thirdparty/grub.git/commit
fs/xfs: Ensuring failing to mount sets a grub_errno
authorB Horn <b@horn.uk>
Sun, 12 May 2024 05:03:58 +0000 (06:03 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 23 Jan 2025 15:22:47 +0000 (16:22 +0100)
commitd1d6b7ea58aa5a80a4c4d0666b49460056c8ef0a
treedf8b323d25a95f4b9101c0c1bf3e11d922f611ab
parent6ccc77b59d16578b10eaf8a4fe85c20b229f0d8a
fs/xfs: Ensuring failing to mount sets a grub_errno

It was previously possible for grub_xfs_mount() to return NULL without
setting grub_errno if the XFS version was invalid. This resulted in it
being possible for grub_dl_unref() to be called twice allowing the XFS
module to be unloaded while there were still references to it.

Fixing this problem in general by ensuring a grub_errno is set if the
fail label is reached.

Reported-by: B Horn <b@horn.uk>
Signed-off-by: B Horn <b@horn.uk>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/fs/xfs.c