[PATCH v3 0/2] Fix memory leaks in hfs and hfsplus

From: Mehdi Ben Hadj Khelifa
Date: Mon Dec 01 2025 - 16:29:22 EST


The Following series fixes a bug reported by syzbot which is specific to
HFS but this issue is also persistent in other filesystems.For now this
series fixes the bug for HFS and HFS+ Filesystems. Other filesystems
need to be checked for the same issue fixed here.

ChangeLog:

Changes from v2:

-Include hfsplus fix

-Align changes to christian's recommendation.

Link:https://lore.kernel.org/all/20251119073845.18578-1-mehdi.benhadjkhelifa@xxxxxxxxx/

Changes from v1:

-Changed the patch direction to focus on hfs changes specifically as
suggested by al viro

Link:https://lore.kernel.org/all/20251114165255.101361-1-mehdi.benhadjkhelifa@xxxxxxxxx/

Mehdi Ben Hadj Khelifa (2):
hfs: ensure sb->s_fs_info is always cleaned up
hfsplus: ensure sb->s_fs_info is always cleaned up

fs/hfs/mdb.c | 35 ++++++++++++++---------------------
fs/hfs/super.c | 10 +++++++++-
fs/hfsplus/super.c | 13 +++++++++----
3 files changed, 32 insertions(+), 26 deletions(-)

--
2.52.0