From: Mehdi Ben Hadj Khelifa <mehdi.benhadjkhelifa@gmail.com>
To: syzbot+ad45f827c88778ff7df6@syzkaller.appspotmail.com
Cc: frank.li@vivo.com, glaubitz@physik.fu-berlin.de,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
slava@dubeyko.com, syzkaller-bugs@googlegroups.com,
Mehdi Ben Hadj Khelifa <mehdi.benhadjkhelifa@gmail.com>
Subject:
Date: Wed, 19 Nov 2025 06:31:51 +0100 [thread overview]
Message-ID: <20251119053201.2949-1-mehdi.benhadjkhelifa@gmail.com> (raw)
In-Reply-To: <69155e34.050a0220.3565dc.0019.GAE@google.com>
#syz test
diff --git a/fs/hfs/super.c b/fs/hfs/super.c
index 47f50fa555a4..06e1c25e47dc 100644
--- a/fs/hfs/super.c
+++ b/fs/hfs/super.c
@@ -49,8 +49,6 @@ static void hfs_put_super(struct super_block *sb)
{
cancel_delayed_work_sync(&HFS_SB(sb)->mdb_work);
hfs_mdb_close(sb);
- /* release the MDB's resources */
- hfs_mdb_put(sb);
}
static void flush_mdb(struct work_struct *work)
@@ -383,7 +381,6 @@ static int hfs_fill_super(struct super_block *sb, struct fs_context *fc)
bail_no_root:
pr_err("get root inode failed\n");
bail:
- hfs_mdb_put(sb);
return res;
}
@@ -431,10 +428,21 @@ static int hfs_init_fs_context(struct fs_context *fc)
return 0;
}
+static void hfs_kill_sb(struct super_block *sb)
+{
+ generic_shutdown_super(sb);
+ hfs_mdb_put(sb);
+ if (sb->s_bdev) {
+ sync_blockdev(sb->s_bdev);
+ bdev_fput(sb->s_bdev_file);
+ }
+
+}
+
static struct file_system_type hfs_fs_type = {
.owner = THIS_MODULE,
.name = "hfs",
- .kill_sb = kill_block_super,
+ .kill_sb = hfs_kill_sb,
.fs_flags = FS_REQUIRES_DEV,
.init_fs_context = hfs_init_fs_context,
};
--
2.52.0
next prev parent reply other threads:[~2025-11-19 4:32 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-13 4:27 [syzbot] [hfs?] memory leak in hfs_init_fs_context syzbot
2025-11-13 21:47 ` Viacheslav Dubeyko
2025-11-14 1:24 ` Mehdi Ben Hadj Khelifa
2025-11-14 2:03 ` [syzbot] [hfs?] memory leak in hfs_init_fs_context syzbot
2025-11-14 3:18 ` Mehdi Ben Hadj Khelifa
2025-11-14 3:00 ` [syzbot] [hfs?] memory leak in hfs_init_fs_context syzbot
2025-11-14 5:12 ` [PATCH] fs/super: fix memory leak of s_fs_info on setup_bdev_super failure Mehdi Ben Hadj Khelifa
2025-11-14 4:26 ` [syzbot] [hfs?] memory leak in hfs_init_fs_context syzbot
2025-11-14 11:55 ` [PATCH] fs/super: fix memory leak of s_fs_info on setup_bdev_super failure Christian Brauner
2025-11-14 16:05 ` Mehdi Ben Hadj Khelifa
2025-11-14 17:15 ` Mehdi Ben Hadj Khelifa
2025-11-19 13:43 ` Christian Brauner
2025-11-19 14:13 ` [syzbot] [hfs?] memory leak in hfs_init_fs_context syzbot
2025-11-19 14:16 ` Christian Brauner
2025-11-19 15:08 ` syzbot
2025-11-14 16:01 ` Mehdi Ben Hadj Khelifa
2025-11-14 15:29 ` [syzbot] [hfs?] memory leak in hfs_init_fs_context syzbot
2025-11-18 17:00 ` Mehdi Ben Hadj Khelifa
2025-11-18 17:15 ` [syzbot] [hfs?] memory leak in hfs_init_fs_context syzbot
2025-11-18 18:27 ` Mehdi Ben Hadj Khelifa
2025-11-18 17:40 ` Al Viro
2025-11-18 20:32 ` [syzbot] [hfs?] memory leak in hfs_init_fs_context syzbot
2025-11-18 19:21 ` Mehdi Ben Hadj Khelifa
2025-11-18 20:32 ` [syzbot] [hfs?] memory leak in hfs_init_fs_context syzbot
2025-11-19 5:31 ` Mehdi Ben Hadj Khelifa [this message]
2025-11-19 5:19 ` syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251119053201.2949-1-mehdi.benhadjkhelifa@gmail.com \
--to=mehdi.benhadjkhelifa@gmail.com \
--cc=frank.li@vivo.com \
--cc=glaubitz@physik.fu-berlin.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=slava@dubeyko.com \
--cc=syzbot+ad45f827c88778ff7df6@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).