diff options
| author | Ahmet Eray Karadag <eraykrdg1@gmail.com> | 2025-12-15 06:14:34 +0300 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-08-31 09:36:20 +0200 |
| commit | b12e20c6ac156a307acdf0545432eb3b6cb41f8f (patch) | |
| tree | 7c4cb2c555e1a55fb2656533f1bfc264e524b222 /tools/perf/scripts/python/stackcollapse.py | |
| parent | fe967191e5851ea79818c5fe4e781c3882139218 (diff) | |
adfs: fix memory leak in sb->s_fs_info
Syzbot reported a memory leak in adfs during the mount process. The issue
arises because the ownership of the allocated (struct adfs_sb_info) is
transferred from the filesystem context to the superblock via sget_fc().
This function sets fc->s_fs_info to NULL after the transfer.
The ADFS filesystem previously used the default kill_block_super for
superblock destruction. This helper performs generic cleanup but does not
free the private sb->s_fs_info data. Since fc->s_fs_info is set to
NULL during the transfer, the standard context cleanup (adfs_free_fc)
also skips freeing this memory. As a result, if the superblock is
destroyed, the allocated struct adfs_sb_info is leaked.
Fix this by implementing a custom .kill_sb callback (adfs_kill_sb)
that explicitly frees sb->s_fs_info before invoking the generic
kill_block_super.
Reported-by: syzbot+1c70732df5fd4f0e4fbb@syzkaller.appspotmail.com
Signed-off-by: Ahmet Eray Karadag <eraykrdg1@gmail.com>
Link: https://patch.msgid.link/20251215031433.182205-2-eraykrdg1@gmail.com
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
