[syzbot] [gfs2?] memory leak in gfs2_trans_begin

From: syzbot
Date: Thu Sep 07 2023 - 19:04:08 EST


Hello,

syzbot found the following issue on:

HEAD commit: 3f86ed6ec0b3 Merge tag 'arc-6.6-rc1' of git://git.kernel.o..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12cda4e7a80000
kernel config: https://syzkaller.appspot.com/x/.config?x=fe0cf825f8fbc075
dashboard link: https://syzkaller.appspot.com/bug?extid=45a7939b6f493f374ee1
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16f3a658680000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/0a6ca0af2bd5/disk-3f86ed6e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ba67b3d88c83/vmlinux-3f86ed6e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/4a64bda3d2e5/bzImage-3f86ed6e.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/6406b55aec21/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+45a7939b6f493f374ee1@xxxxxxxxxxxxxxxxxxxxxxxxx

2023/09/05 14:30:51 executed programs: 30
BUG: memory leak
unreferenced object 0xffff8881214cbc60 (size 144):
comm "syz-executor.7", pid 5069, jiffies 4294970978 (age 14.110s)
hex dump (first 32 bytes):
ae 04 1f 82 ff ff ff ff 02 00 00 00 00 00 00 00 ................
08 00 00 00 00 00 00 00 06 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff821f3e39>] kmem_cache_zalloc include/linux/slab.h:710 [inline]
[<ffffffff821f3e39>] gfs2_trans_begin+0x29/0xa0 fs/gfs2/trans.c:115
[<ffffffff821f04ae>] gfs2_statfs_sync+0x1ae/0x250 fs/gfs2/super.c:298
[<ffffffff821f0d01>] gfs2_make_fs_ro+0x1b1/0x430 fs/gfs2/super.c:566
[<ffffffff821f14ac>] gfs2_put_super+0x2bc/0x2d0 fs/gfs2/super.c:623
[<ffffffff8168f43e>] generic_shutdown_super+0x9e/0x170 fs/super.c:693
[<ffffffff8168f58d>] kill_block_super+0x1d/0x50 fs/super.c:1646
[<ffffffff821d4a7f>] gfs2_kill_sb+0x1bf/0x1f0 fs/gfs2/ops_fstype.c:1795
[<ffffffff8169065a>] deactivate_locked_super+0x4a/0x110 fs/super.c:481
[<ffffffff816907bc>] deactivate_super fs/super.c:514 [inline]
[<ffffffff816907bc>] deactivate_super+0x9c/0xb0 fs/super.c:510
[<ffffffff816cd041>] cleanup_mnt+0x121/0x210 fs/namespace.c:1254
[<ffffffff812d2b5f>] task_work_run+0x8f/0xe0 kernel/task_work.c:179
[<ffffffff81361556>] resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
[<ffffffff81361556>] exit_to_user_mode_loop kernel/entry/common.c:171 [inline]
[<ffffffff81361556>] exit_to_user_mode_prepare+0x116/0x140 kernel/entry/common.c:204
[<ffffffff84b29c41>] __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
[<ffffffff84b29c41>] syscall_exit_to_user_mode+0x21/0x50 kernel/entry/common.c:296
[<ffffffff84b25fb4>] do_syscall_64+0x44/0xb0 arch/x86/entry/common.c:86
[<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0xcd



---
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@xxxxxxxxxxxxxxxx.

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

If the bug is already fixed, 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 bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

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

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