public inbox for gfs2@lists.linux.dev
 help / color / mirror / Atom feed
* [syzbot] [gfs2?] memory leak in gfs2_quota_init (2)
@ 2026-02-04 16:58 syzbot
  2026-02-05  6:31 ` Qing Wang
  2026-02-05  9:06 ` Qing Wang
  0 siblings, 2 replies; 5+ messages in thread
From: syzbot @ 2026-02-04 16:58 UTC (permalink / raw)
  To: agruenba, gfs2, linux-kernel, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    283073725700 Merge tag 'riscv-for-linus-6.19-rc8' of git:/..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=108d3c5a580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=9d7d0fbecb37bff8
dashboard link: https://syzkaller.appspot.com/bug?extid=e57495fb65020ac7bca4
compiler:       gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=158fa72a580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=174c9644580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/29ae0baa9654/disk-28307372.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/cc5f836cdf79/vmlinux-28307372.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c40c2fb29195/bzImage-28307372.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/bb1679f271de/mount_0.gz
  fsck result: failed (log: https://syzkaller.appspot.com/x/fsck.log?x=170d3c5a580000)

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+e57495fb65020ac7bca4@syzkaller.appspotmail.com

BUG: memory leak
unreferenced object 0xffff88810e866000 (size 8192):
  comm "syz.0.477", pid 7931, jiffies 4295008793
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace (crc 8429a099):
    kmemleak_alloc_recursive include/linux/kmemleak.h:44 [inline]
    slab_post_alloc_hook mm/slub.c:4958 [inline]
    slab_alloc_node mm/slub.c:5263 [inline]
    __do_kmalloc_node mm/slub.c:5656 [inline]
    __kmalloc_noprof+0x465/0x680 mm/slub.c:5669
    kmalloc_noprof include/linux/slab.h:961 [inline]
    kzalloc_noprof include/linux/slab.h:1094 [inline]
    gfs2_quota_init+0xe5/0x820 fs/gfs2/quota.c:1409
    gfs2_make_fs_rw+0x7a/0xe0 fs/gfs2/super.c:149
    gfs2_fill_super+0xfbb/0x1210 fs/gfs2/ops_fstype.c:1275
    get_tree_bdev_flags+0x1c0/0x290 fs/super.c:1691
    gfs2_get_tree+0x26/0xd0 fs/gfs2/ops_fstype.c:1332
    vfs_get_tree+0x30/0x120 fs/super.c:1751
    fc_mount fs/namespace.c:1199 [inline]
    do_new_mount_fc fs/namespace.c:3636 [inline]
    do_new_mount fs/namespace.c:3712 [inline]
    path_mount+0x5a9/0x1350 fs/namespace.c:4022
    do_mount fs/namespace.c:4035 [inline]
    __do_sys_mount fs/namespace.c:4224 [inline]
    __se_sys_mount fs/namespace.c:4201 [inline]
    __x64_sys_mount+0x1a3/0x1e0 fs/namespace.c:4201
    do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
    do_syscall_64+0xa4/0xf80 arch/x86/entry/syscall_64.c:94
    entry_SYSCALL_64_after_hwframe+0x77/0x7f

connection error: failed to recv *flatrpc.ExecutorMessageRawT: EOF


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [syzbot] [gfs2?] memory leak in gfs2_quota_init (2)
  2026-02-04 16:58 [syzbot] [gfs2?] memory leak in gfs2_quota_init (2) syzbot
@ 2026-02-05  6:31 ` Qing Wang
  2026-02-05  8:41   ` syzbot
  2026-02-05  9:06 ` Qing Wang
  1 sibling, 1 reply; 5+ messages in thread
From: Qing Wang @ 2026-02-05  6:31 UTC (permalink / raw)
  To: syzbot+e57495fb65020ac7bca4; +Cc: agruenba, gfs2, linux-kernel, syzkaller-bugs

#syz test

diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index f6cd907b3ec6..1144720a17ff 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -149,9 +149,12 @@ int gfs2_make_fs_rw(struct gfs2_sbd *sdp)
 	error = gfs2_quota_init(sdp);
 	if (!error && gfs2_withdrawn(sdp))
 		error = -EIO;
-	if (!error)
-		set_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags);
-	return error;
+	if (error) {
+		gfs2_quota_cleanup(sdp);
+		return error;
+	}
+	set_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags);
+	return 0;
 }
 
 void gfs2_statfs_change_in(struct gfs2_statfs_change_host *sc, const void *buf)

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [syzbot] [gfs2?] memory leak in gfs2_quota_init (2)
  2026-02-05  6:31 ` Qing Wang
@ 2026-02-05  8:41   ` syzbot
  0 siblings, 0 replies; 5+ messages in thread
From: syzbot @ 2026-02-05  8:41 UTC (permalink / raw)
  To: agruenba, gfs2, linux-kernel, syzkaller-bugs, wangqing7171

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+e57495fb65020ac7bca4@syzkaller.appspotmail.com
Tested-by: syzbot+e57495fb65020ac7bca4@syzkaller.appspotmail.com

Tested on:

commit:         f14faaf3 Merge tag 'tsm-fixes-for-6.19' of git://git.k..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13bc8a5a580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=9d7d0fbecb37bff8
dashboard link: https://syzkaller.appspot.com/bug?extid=e57495fb65020ac7bca4
compiler:       gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
patch:          https://syzkaller.appspot.com/x/patch.diff?x=12710a52580000

Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [syzbot] [gfs2?] memory leak in gfs2_quota_init (2)
  2026-02-04 16:58 [syzbot] [gfs2?] memory leak in gfs2_quota_init (2) syzbot
  2026-02-05  6:31 ` Qing Wang
@ 2026-02-05  9:06 ` Qing Wang
  2026-02-05  9:36   ` syzbot
  1 sibling, 1 reply; 5+ messages in thread
From: Qing Wang @ 2026-02-05  9:06 UTC (permalink / raw)
  To: syzbot+e57495fb65020ac7bca4; +Cc: agruenba, gfs2, linux-kernel, syzkaller-bugs

#syz test

diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index f6cd907b3ec6..efa0e2452bc7 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -147,8 +147,10 @@ int gfs2_make_fs_rw(struct gfs2_sbd *sdp)
 	}
 
 	error = gfs2_quota_init(sdp);
-	if (!error && gfs2_withdrawn(sdp))
-		error = -EIO;
+	if (!error && gfs2_withdrawn(sdp)) {
+		gfs2_quota_cleanup(sdp);
+		return -EIO;
+	}
 	if (!error)
 		set_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags);
 	return error;

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [syzbot] [gfs2?] memory leak in gfs2_quota_init (2)
  2026-02-05  9:06 ` Qing Wang
@ 2026-02-05  9:36   ` syzbot
  0 siblings, 0 replies; 5+ messages in thread
From: syzbot @ 2026-02-05  9:36 UTC (permalink / raw)
  To: agruenba, gfs2, linux-kernel, syzkaller-bugs, wangqing7171

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+e57495fb65020ac7bca4@syzkaller.appspotmail.com
Tested-by: syzbot+e57495fb65020ac7bca4@syzkaller.appspotmail.com

Tested on:

commit:         f14faaf3 Merge tag 'tsm-fixes-for-6.19' of git://git.k..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=138c30aa580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=9d7d0fbecb37bff8
dashboard link: https://syzkaller.appspot.com/bug?extid=e57495fb65020ac7bca4
compiler:       gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
patch:          https://syzkaller.appspot.com/x/patch.diff?x=103eda5a580000

Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-02-05  9:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-04 16:58 [syzbot] [gfs2?] memory leak in gfs2_quota_init (2) syzbot
2026-02-05  6:31 ` Qing Wang
2026-02-05  8:41   ` syzbot
2026-02-05  9:06 ` Qing Wang
2026-02-05  9:36   ` syzbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox