[v5.15] WARNING in btrfs_replace_file_extents

0 views
Skip to first unread message

syzbot

unread,
Apr 9, 2023, 10:43:42 PM4/9/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: d86dfc4d95cd Linux 5.15.106
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12915ce3c80000
kernel config: https://syzkaller.appspot.com/x/.config?x=639d55ab480652c5
dashboard link: https://syzkaller.appspot.com/bug?extid=72c30bbc638e9af84f61
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/b2a94107dd69/disk-d86dfc4d.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/398f8d288cb9/vmlinux-d86dfc4d.xz
kernel image: https://storage.googleapis.com/syzbot-assets/9b790c7e7c8c/Image-d86dfc4d.gz.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+72c30b...@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: 10070 at fs/btrfs/file.c:2958 btrfs_replace_file_extents+0xe1c/0x1388 fs/btrfs/file.c:2958
Modules linked in:
CPU: 1 PID: 10070 Comm: syz-executor.2 Not tainted 5.15.106-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : btrfs_replace_file_extents+0xe1c/0x1388 fs/btrfs/file.c:2958
lr : btrfs_replace_file_extents+0xe1c/0x1388 fs/btrfs/file.c:2958
sp : ffff80001fc272c0
x29: ffff80001fc27420 x28: ffff0000ce5e8a00 x27: 0000000000000000
x26: dfff800000000000 x25: ffff0000df4cb790 x24: ffff0000df6589d0
x23: 0000000000000fff x22: 00000000fffffff4 x21: 0000000000001000
x20: 1fffe0001be996fd x19: ffff0000df4cb7e8 x18: 0000000000000001
x17: ff80800008333ebc x16: ffff800011940934 x15: ffff800008333ebc
x14: 00000000ffffffff x13: ffffffffffffffff x12: 0000000000040000
x11: 000000000000e34b x10: ffff8000204fa000 x9 : 452c50900ad83a00
x8 : 452c50900ad83a00 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff80001fc26a38 x4 : ffff8000149af940 x3 : ffff80000854a334
x2 : 0000000000000001 x1 : 0000000100000000 x0 : 0000000000000026
Call trace:
btrfs_replace_file_extents+0xe1c/0x1388 fs/btrfs/file.c:2958
btrfs_clone+0xe28/0x2318 fs/btrfs/reflink.c:492
btrfs_clone_files+0x278/0x31c fs/btrfs/reflink.c:740
btrfs_remap_file_range+0x4c8/0xc08 fs/btrfs/reflink.c:888
vfs_copy_file_range+0xd9c/0x1130 fs/read_write.c:1510
__do_sys_copy_file_range fs/read_write.c:1588 [inline]
__se_sys_copy_file_range fs/read_write.c:1551 [inline]
__arm64_sys_copy_file_range+0x5f8/0x9d8 fs/read_write.c:1551
__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: 87530
hardirqs last enabled at (87529): [<ffff800008329afc>] __up_console_sem+0xb4/0x100 kernel/printk/printk.c:257
hardirqs last disabled at (87530): [<ffff80001193bfc8>] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:387
softirqs last enabled at (87506): [<ffff800008020ccc>] softirq_handle_end kernel/softirq.c:401 [inline]
softirqs last enabled at (87506): [<ffff800008020ccc>] __do_softirq+0xb5c/0xe20 kernel/softirq.c:587
softirqs last disabled at (87473): [<ffff8000081b56e0>] do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline]
softirqs last disabled at (87473): [<ffff8000081b56e0>] invoke_softirq kernel/softirq.c:439 [inline]
softirqs last disabled at (87473): [<ffff8000081b56e0>] __irq_exit_rcu+0x28c/0x534 kernel/softirq.c:636
---[ end trace cc2ca713cb8a5072 ]---
BTRFS: error (device loop2) in btrfs_replace_file_extents:2958: errno=-12 Out of memory
BTRFS info (device loop2): forced readonly


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

syzbot

unread,
May 18, 2023, 7:13:50 PM5/18/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 9d6bde853685 Linux 5.15.112
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=13ea4d0e280000
kernel config: https://syzkaller.appspot.com/x/.config?x=508f7a387ef8f82b
dashboard link: https://syzkaller.appspot.com/bug?extid=72c30bbc638e9af84f61
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=140dc50e280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16ad0691280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/a8ab2bd416bb/disk-9d6bde85.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/c358e3d58bb2/vmlinux-9d6bde85.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c82319bbaeb8/Image-9d6bde85.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/65f54c05dd6c/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+72c30b...@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: 4119 at fs/btrfs/file.c:2958 btrfs_replace_file_extents+0xe1c/0x1388 fs/btrfs/file.c:2958
Modules linked in:
CPU: 0 PID: 4119 Comm: syz-executor138 Not tainted 5.15.112-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : btrfs_replace_file_extents+0xe1c/0x1388 fs/btrfs/file.c:2958
lr : btrfs_replace_file_extents+0xe1c/0x1388 fs/btrfs/file.c:2958
sp : ffff80001d517060
x29: ffff80001d5171c0 x28: ffff0000c1cfb200 x27: 0000000000000000
x26: dfff800000000000 x25: ffff0000dc7fb8f0 x24: ffff0000df8b0000
x23: 0000000000000fff x22: 00000000fffffff4 x21: 0000000000000000
x20: 1fffe0001b8ff729 x19: ffff0000dc7fb948 x18: 0000000000000001
x17: ff80800008335ea8 x16: ffff80001194786c x15: ffff800008335ea8
x14: 00000000ffffffff x13: ffffffffffffffff x12: 0000000000000000
x11: ff8080000832d950 x10: 0000000000000000 x9 : 2cdaec3160db0c00
x8 : 2cdaec3160db0c00 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff80001d5167d8 x4 : ffff8000149afce0 x3 : ffff80000854c9ec
x2 : 0000000000000001 x1 : 0000000100000000 x0 : 0000000000000026
Call trace:
btrfs_replace_file_extents+0xe1c/0x1388 fs/btrfs/file.c:2958
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_fallocate+0x166c/0x1954 fs/btrfs/file.c:3603
vfs_fallocate+0x478/0x5b4 fs/open.c:308
ioctl_preallocate+0x2a0/0x34c fs/ioctl.c:294
do_vfs_ioctl+0x1d00/0x2a38 fs/ioctl.c:853
__do_sys_ioctl fs/ioctl.c:872 [inline]
__se_sys_ioctl fs/ioctl.c:860 [inline]
__arm64_sys_ioctl+0xe4/0x1c8 fs/ioctl.c:860
__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: 71456
hardirqs last enabled at (71455): [<ffff80000832bae8>] __up_console_sem+0xb4/0x100 kernel/printk/printk.c:257
hardirqs last disabled at (71456): [<ffff800011942f00>] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:387
softirqs last enabled at (71436): [<ffff800008020ccc>] softirq_handle_end kernel/softirq.c:401 [inline]
softirqs last enabled at (71436): [<ffff800008020ccc>] __do_softirq+0xb5c/0xe20 kernel/softirq.c:587
softirqs last disabled at (71365): [<ffff8000081b573c>] do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline]
softirqs last disabled at (71365): [<ffff8000081b573c>] invoke_softirq kernel/softirq.c:439 [inline]
softirqs last disabled at (71365): [<ffff8000081b573c>] __irq_exit_rcu+0x28c/0x534 kernel/softirq.c:636
---[ end trace f0df0365feee4a4e ]---
BTRFS: error (device loop0) in btrfs_replace_file_extents:2958: errno=-12 Out of memory
BTRFS info (device loop0): forced readonly


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