[v5.15] WARNING in btrfs_drop_extents

0 views
Skip to first unread message

syzbot

unread,
Jul 17, 2023, 5:20:52 AM7/17/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: d54cfc420586 Linux 5.15.120
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1468d142a80000
kernel config: https://syzkaller.appspot.com/x/.config?x=1cbb66d8f24dbb30
dashboard link: https://syzkaller.appspot.com/bug?extid=f89428e9af97a9cf157f
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/a7edb50fe106/disk-d54cfc42.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/6d9892e76c6e/vmlinux-d54cfc42.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0fd11af6d33e/Image-d54cfc42.gz.xz

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

el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
------------[ cut here ]------------
WARNING: CPU: 0 PID: 3684 at fs/btrfs/file.c:966 btrfs_drop_extents+0x2664/0x2b80 fs/btrfs/file.c:966
Modules linked in:
CPU: 0 PID: 3684 Comm: syz-executor.1 Not tainted 5.15.120-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : btrfs_drop_extents+0x2664/0x2b80 fs/btrfs/file.c:966
lr : btrfs_drop_extents+0x2664/0x2b80 fs/btrfs/file.c:966
sp : ffff800023676fc0
x29: ffff800023677300 x28: 00000000fffffff4 x27: ffff0000d1118040
x26: ffff00012b0d65d0 x25: dfff800000000000 x24: ffff800023677210
x23: 0000000000011000 x22: ffff8000236771a0 x21: 0000000000011000
x20: 1fffe0001b9690d1 x19: ffff0000dcb48688 x18: 0000000000000001
x17: ff80800008335ea8 x16: ffff80001195b9f4 x15: ffff800008335ea8
x14: 00000000ffffffff x13: ffffffffffffffff x12: 0000000000040000
x11: 000000000001020d x10: ffff8000255ab000 x9 : 24179782db96e700
x8 : 24179782db96e700 x7 : fffffffffffd90a0 x6 : fffffffffffd9068
x5 : ffff800023676738 x4 : ffff8000149a8ef8 x3 : ffff80000854e3cc
x2 : 0000000000000001 x1 : 0000000100000000 x0 : 0000000000000026
Call trace:
btrfs_drop_extents+0x2664/0x2b80 fs/btrfs/file.c:966
btrfs_replace_file_extents+0x3a4/0x1388 fs/btrfs/file.c:2796
insert_prealloc_file_extent fs/btrfs/inode.c:10336 [inline]
__btrfs_prealloc_file_range+0x5ac/0x1164 fs/btrfs/inode.c:10404
btrfs_prealloc_file_range+0x60/0x7c fs/btrfs/inode.c:10494
btrfs_zero_range+0xd58/0xfd8 fs/btrfs/file.c:3400
btrfs_fallocate+0xb4c/0x1954 fs/btrfs/file.c:3515
vfs_fallocate+0x478/0x5b4 fs/open.c:308
ksys_fallocate fs/open.c:331 [inline]
__do_sys_fallocate fs/open.c:339 [inline]
__se_sys_fallocate fs/open.c:337 [inline]
__arm64_sys_fallocate+0xc0/0x110 fs/open.c:337
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
irq event stamp: 81398
hardirqs last enabled at (81397): [<ffff80000832bae8>] __up_console_sem+0xb4/0x100 kernel/printk/printk.c:257
hardirqs last disabled at (81398): [<ffff800011957088>] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:387
softirqs last enabled at (81378): [<ffff800008020ccc>] softirq_handle_end kernel/softirq.c:401 [inline]
softirqs last enabled at (81378): [<ffff800008020ccc>] __do_softirq+0xb5c/0xe20 kernel/softirq.c:587
softirqs last disabled at (81321): [<ffff8000081b573c>] do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline]
softirqs last disabled at (81321): [<ffff8000081b573c>] invoke_softirq kernel/softirq.c:439 [inline]
softirqs last disabled at (81321): [<ffff8000081b573c>] __irq_exit_rcu+0x28c/0x534 kernel/softirq.c:636
---[ end trace 408abd17fa9ca9f2 ]---
BTRFS: error (device loop1) in btrfs_drop_extents:966: errno=-12 Out of memory
BTRFS info (device loop1): forced readonly
BTRFS: error (device loop1) in btrfs_replace_file_extents:2813: errno=-12 Out of memory


---
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 syzk...@googlegroups.com.

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 to change 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

syzbot

unread,
Jul 17, 2023, 7:56:44 AM7/17/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: d54cfc420586 Linux 5.15.120
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=125b86b6a80000
kernel config: https://syzkaller.appspot.com/x/.config?x=1cbb66d8f24dbb30
dashboard link: https://syzkaller.appspot.com/bug?extid=f89428e9af97a9cf157f
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11908c66a80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=170dfc66a80000
mounted in repro: https://storage.googleapis.com/syzbot-assets/cf02ab27a575/mount_0.gz

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

el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
------------[ cut here ]------------
WARNING: CPU: 1 PID: 4080 at fs/btrfs/file.c:966 btrfs_drop_extents+0x2664/0x2b80 fs/btrfs/file.c:966
Modules linked in:
CPU: 1 PID: 4080 Comm: syz-executor140 Not tainted 5.15.120-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : btrfs_drop_extents+0x2664/0x2b80 fs/btrfs/file.c:966
lr : btrfs_drop_extents+0x2664/0x2b80 fs/btrfs/file.c:966
sp : ffff80001d2e6fc0
x29: ffff80001d2e7300 x28: 00000000fffffff4 x27: ffff0000c7c033b0
x26: ffff0000c8d17360 x25: dfff800000000000 x24: ffff80001d2e7210
x23: 0000000000011000 x22: ffff80001d2e71a0 x21: 0000000000011000
x20: 1fffe0001b8f476b x19: ffff0000dc7a3b58 x18: 0000000000000001
x17: ff80800008335ea8 x16: ffff80001195b9f4 x15: ffff800008335ea8
x14: 00000000ffffffff x13: ffffffffffffffff x12: 0000000000000000
x11: ff8080000832d950 x10: 0000000000000000 x9 : d0bbd428e51d9100
x8 : d0bbd428e51d9100 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff80001d2e6738 x4 : ffff8000149cfca0 x3 : ffff80000854e3cc
x2 : 0000000000000001 x1 : 0000000100000000 x0 : 0000000000000026
Call trace:
btrfs_drop_extents+0x2664/0x2b80 fs/btrfs/file.c:966
btrfs_replace_file_extents+0x3a4/0x1388 fs/btrfs/file.c:2796
insert_prealloc_file_extent fs/btrfs/inode.c:10336 [inline]
__btrfs_prealloc_file_range+0x5ac/0x1164 fs/btrfs/inode.c:10404
btrfs_prealloc_file_range+0x60/0x7c fs/btrfs/inode.c:10494
btrfs_zero_range+0xd58/0xfd8 fs/btrfs/file.c:3400
btrfs_fallocate+0xb4c/0x1954 fs/btrfs/file.c:3515
vfs_fallocate+0x478/0x5b4 fs/open.c:308
ksys_fallocate fs/open.c:331 [inline]
__do_sys_fallocate fs/open.c:339 [inline]
__se_sys_fallocate fs/open.c:337 [inline]
__arm64_sys_fallocate+0xc0/0x110 fs/open.c:337
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
irq event stamp: 70870
hardirqs last enabled at (70869): [<ffff80000832bae8>] __up_console_sem+0xb4/0x100 kernel/printk/printk.c:257
hardirqs last disabled at (70870): [<ffff800011957088>] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:387
softirqs last enabled at (70850): [<ffff800008020ccc>] softirq_handle_end kernel/softirq.c:401 [inline]
softirqs last enabled at (70850): [<ffff800008020ccc>] __do_softirq+0xb5c/0xe20 kernel/softirq.c:587
softirqs last disabled at (70823): [<ffff8000081b573c>] do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline]
softirqs last disabled at (70823): [<ffff8000081b573c>] invoke_softirq kernel/softirq.c:439 [inline]
softirqs last disabled at (70823): [<ffff8000081b573c>] __irq_exit_rcu+0x28c/0x534 kernel/softirq.c:636
---[ end trace 37c948a64ba68f44 ]---
BTRFS: error (device loop0) in btrfs_drop_extents:966: errno=-12 Out of memory
BTRFS info (device loop0): forced readonly
BTRFS: error (device loop0) in btrfs_replace_file_extents:2813: errno=-12 Out of memory


---
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.
Reply all
Reply to author
Forward
0 new messages