------------[ cut here ]------------
VFS: brelse: Trying to free free buffer
WARNING: CPU: 1 PID: 6369 at fs/buffer.c:1229 __brelse fs/buffer.c:1229 [inline]
WARNING: CPU: 1 PID: 6369 at fs/buffer.c:1229 __brelse+0x6d/0xb0 fs/buffer.c:1223
Modules linked in:
CPU: 1 UID: 0 PID: 6369 Comm: syz.5.122 Not tainted 6.13.0-rc5-syzkaller-00012-g0bc21e701a6f #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:__brelse fs/buffer.c:1229 [inline]
RIP: 0010:__brelse+0x6d/0xb0 fs/buffer.c:1223
Code: 84 d2 75 52 44 8b 63 60 31 ff 44 89 e6 e8 fb d5 79 ff 45 85 e4 75 20 e8 b1 d3 79 ff 90 48 c7 c7 e0 24 7f 8b e8 b4 0d 3a ff 90 <0f> 0b 90 90 5b 5d 41 5c e9 96 d3 79 ff e8 91 d3 79 ff be 04 00 00
RSP: 0018:ffffc90000a18f40 EFLAGS: 00010082
RAX: 0000000000000000 RBX: ffff88805c242ae0 RCX: ffffffff815a5139
RDX: ffff888027b90000 RSI: ffffffff815a5146 RDI: 0000000000000001
RBP: ffff88805c242b40 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000002 R12: 0000000000000000
R13: ffff88805c242ae0 R14: dffffc0000000000 R15: ffffffff82204240
FS: 00007ff91d2f96c0(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff912dff000 CR3: 000000005c786000 CR4: 0000000000350ef0
Call Trace:
brelse include/linux/buffer_head.h:324 [inline]
__invalidate_bh_lrus fs/buffer.c:1498 [inline]
invalidate_bh_lru+0xa2/0x190 fs/buffer.c:1511
csd_do_func kernel/smp.c:134 [inline]
__flush_smp_call_function_queue+0x27d/0x8c0 kernel/smp.c:540
__sysvec_call_function_single+0x8c/0x410 arch/x86/kernel/smp.c:271
instr_sysvec_call_function_single arch/x86/kernel/smp.c:266 [inline]
sysvec_call_function_single+0x9f/0xc0 arch/x86/kernel/smp.c:266
asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:709
RIP: 0010:memcg1_commit_charge+0x10e/0x170 mm/memcontrol-v1.c:569
Code: 9c 58 f6 c4 02 75 3f 5b 5d 41 5c 41 5d e9 85 3c 4d 09 e8 45 b2 9e ff e9 21 ff ff ff e8 1b b4 9e ff 9c 58 f6 c4 02 75 33 fb 5b <5d> 41 5c 41 5d e9 63 3c 4d 09 48 c7 c6 a0 ef 7c 8b 48 89 df e8 f9
RSP: 0018:ffffc9000b7df8c8 EFLAGS: 00000246
RAX: 0000000000000006 RBX: ffff888032536000 RCX: 1ffffffff2dd2b20
RDX: 0000000000000000 RSI: ffffffff8b6cd9e0 RDI: ffffffff8bd1dea0
RBP: ffffea0001586180 R08: 0000000000000001 R09: fffffbfff2dc9bae
R10: ffffffff96e4dd77 R11: 0000000000000002 R12: 0000000000000200
R13: ffff888032536000 R14: 0000000000000cc0 R15: ffff88803148f0b8
charge_memcg mm/memcontrol.c:4501 [inline]
__mem_cgroup_charge+0xb0/0x280 mm/memcontrol.c:4512
mem_cgroup_charge include/linux/memcontrol.h:646 [inline]
shmem_alloc_and_add_folio+0x507/0xc00 mm/shmem.c:1847
shmem_get_folio_gfp+0x689/0x1530 mm/shmem.c:2357
shmem_get_folio mm/shmem.c:2463 [inline]
shmem_write_begin+0x161/0x300 mm/shmem.c:3119
generic_perform_write+0x2bd/0x920 mm/filemap.c:4055
shmem_file_write_iter+0x10e/0x140 mm/shmem.c:3295
new_sync_write fs/read_write.c:586 [inline]
vfs_write+0x5b1/0x1150 fs/read_write.c:679
ksys_write+0x12b/0x250 fs/read_write.c:731
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ff91c5847df
Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 f9 92 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 4c 93 02 00 48
RSP: 002b:00007ff91d2f8df0 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000001000000 RCX: 00007ff91c5847df
RDX: 0000000001000000 RSI: 00007ff911e00000 RDI: 0000000000000004
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000005f49
R10: 0000000020009042 R11: 0000000000000293 R12: 0000000000000004
R13: 00007ff91d2f8ef0 R14: 00007ff91d2f8eb0 R15: 00007ff911e00000
----------------
Code disassembly (best guess):
0: 9c pushf
1: 58 pop %rax
2: f6 c4 02 test $0x2,%ah
5: 75 3f jne 0x46
7: 5b pop %rbx
8: 5d pop %rbp
9: 41 5c pop %r12
b: 41 5d pop %r13
d: e9 85 3c 4d 09 jmp 0x94d3c97
12: e8 45 b2 9e ff call 0xff9eb25c
17: e9 21 ff ff ff jmp 0xffffff3d
1c: e8 1b b4 9e ff call 0xff9eb43c
21: 9c pushf
22: 58 pop %rax
23: f6 c4 02 test $0x2,%ah
26: 75 33 jne 0x5b
28: fb sti
29: 5b pop %rbx
* 2a: 5d pop %rbp <-- trapping instruction
2b: 41 5c pop %r12
2d: 41 5d pop %r13
2f: e9 63 3c 4d 09 jmp 0x94d3c97
34: 48 c7 c6 a0 ef 7c 8b mov $0xffffffff8b7cefa0,%rsi
3b: 48 89 df mov %rbx,%rdi
3e: e8 .byte 0xe8
3f: f9 stc