------------[ cut here ]------------ kernel BUG at include/linux/scatterlist.h:171! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5104 Comm: syz.0.0 Not tainted 6.11.0-syzkaller-08068-g1ec6d097897a #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 RIP: 0010:sg_page include/linux/scatterlist.h:171 [inline] RIP: 0010:sg_phys include/linux/scatterlist.h:389 [inline] RIP: 0010:perf_trace_dma_unmap_sg+0x784/0x790 include/trace/events/dma.h:224 Code: 00 48 8b 54 24 08 e9 6b fe ff ff e8 06 7d 17 00 48 c7 c7 60 79 94 8e 4c 89 f6 e8 27 33 74 03 e9 5b fa ff ff e8 ed 7c 17 00 90 <0f> 0b e8 f5 ea 43 0a 0f 1f 44 00 00 90 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffc90000007aa0 EFLAGS: 00010006 RAX: ffffffff817d37f3 RBX: ffff888000248f88 RCX: ffff88801f0e8000 RDX: 0000000000010000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: ffffc90000007bd0 R08: ffffffff817d34eb R09: 322e66313a30303a R10: dffffc0000000000 R11: fffff91ffff88a3a R12: 0000000000000008 R13: ffff8880126b5dc1 R14: ffff888000248fa8 R15: dffffc0000000000 FS: 00007f8d5c4c36c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f7f8d0c2723 CR3: 0000000035f9e000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: trace_dma_unmap_sg+0x1c2/0x230 include/trace/events/dma.h:224 dma_unmap_sg_attrs+0x49/0xe0 kernel/dma/mapping.c:308 ata_sg_clean drivers/ata/libata-core.c:4627 [inline] __ata_qc_complete+0x1ae/0x5b0 drivers/ata/libata-core.c:4720 ata_qc_complete_multiple+0x1a3/0x280 drivers/ata/libata-sata.c:789 ahci_qc_complete drivers/ata/libahci.c:1881 [inline] ahci_handle_port_interrupt+0x422/0x650 drivers/ata/libahci.c:1948 ahci_port_intr drivers/ata/libahci.c:1959 [inline] ahci_handle_port_intr+0x18e/0x2c0 drivers/ata/libahci.c:1990 ahci_single_level_irq_intr+0xa1/0xf0 drivers/ata/libahci.c:2024 __handle_irq_event_percpu+0x29a/0xa80 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:193 [inline] handle_irq_event+0x89/0x1f0 kernel/irq/handle.c:210 handle_edge_irq+0x25f/0xc20 kernel/irq/chip.c:831 generic_handle_irq_desc include/linux/irqdesc.h:173 [inline] handle_irq arch/x86/kernel/irq.c:247 [inline] call_irq_handler arch/x86/kernel/irq.c:259 [inline] __common_interrupt+0x136/0x230 arch/x86/kernel/irq.c:285 common_interrupt+0xb4/0xd0 arch/x86/kernel/irq.c:278 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693 RIP: 0010:preempt_count_add+0x6/0x190 kernel/sched/core.c:5719 Code: 48 8b 3c 24 e8 bb 71 9a 00 eb 8c e9 ee fe ff ff 0f 1f 40 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 41 57 <41> 56 53 89 fb 48 c7 c0 40 e9 3a 9a 48 c1 e8 03 49 bf 00 00 00 00 RSP: 0018:ffffc90002f2eb80 EFLAGS: 00000202 RAX: 0000000000000001 RBX: 1ffff920005e5d98 RCX: ffffc90002f2ec60 RDX: dffffc0000000000 RSI: ffffc90002f30000 RDI: 0000000000000001 RBP: ffffc90002f2ecf8 R08: ffffc90002f2ed01 R09: 0000000000000000 R10: ffffc90002f2ecc0 R11: fffff520005e5da4 R12: dffffc0000000000 R13: ffffc90002f2ecc0 R14: ffffffff81414f18 R15: ffffc90002f2ecc8 unwind_next_frame+0xb0/0x22d0 arch/x86/kernel/unwind_orc.c:479 __unwind_start+0x59a/0x740 arch/x86/kernel/unwind_orc.c:760 unwind_start arch/x86/include/asm/unwind.h:64 [inline] arch_stack_walk+0xe5/0x150 arch/x86/kernel/stacktrace.c:24 stack_trace_save+0x118/0x1d0 kernel/stacktrace.c:122 kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x59/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:2343 [inline] slab_free mm/slub.c:4580 [inline] kmem_cache_free+0x1a2/0x420 mm/slub.c:4682 convert_extent_bit+0xcda/0x1610 fs/btrfs/extent-io-tree.c:1501 btrfs_write_marked_extents+0x1f4/0x450 fs/btrfs/transaction.c:1130 btrfs_write_and_wait_transaction fs/btrfs/transaction.c:1259 [inline] btrfs_commit_transaction+0x1de1/0x3740 fs/btrfs/transaction.c:2521 btrfs_delete_free_space_tree+0x383/0x730 fs/btrfs/free-space-tree.c:1312 btrfs_start_pre_rw_mount+0xf28/0x1300 fs/btrfs/disk-io.c:3011 open_ctree+0x2514/0x2a50 fs/btrfs/disk-io.c:3546 btrfs_fill_super fs/btrfs/super.c:965 [inline] btrfs_get_tree_super fs/btrfs/super.c:1888 [inline] btrfs_get_tree+0xe7a/0x1920 fs/btrfs/super.c:2114 vfs_get_tree+0x90/0x2b0 fs/super.c:1800 fc_mount+0x1b/0xb0 fs/namespace.c:1231 btrfs_get_tree_subvol fs/btrfs/super.c:2077 [inline] btrfs_get_tree+0x652/0x1920 fs/btrfs/super.c:2115 vfs_get_tree+0x90/0x2b0 fs/super.c:1800 do_new_mount+0x2be/0xb40 fs/namespace.c:3507 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4055 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4032 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f8d5b77f69a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f8d5c4c2e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f8d5c4c2ef0 RCX: 00007f8d5b77f69a RDX: 0000000020000100 RSI: 0000000020005140 RDI: 00007f8d5c4c2eb0 RBP: 0000000020000100 R08: 00007f8d5c4c2ef0 R09: 0000000000000816 R10: 0000000000000816 R11: 0000000000000246 R12: 0000000020005140 R13: 00007f8d5c4c2eb0 R14: 00000000000050ed R15: 0000000020000280 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:sg_page include/linux/scatterlist.h:171 [inline] RIP: 0010:sg_phys include/linux/scatterlist.h:389 [inline] RIP: 0010:perf_trace_dma_unmap_sg+0x784/0x790 include/trace/events/dma.h:224 Code: 00 48 8b 54 24 08 e9 6b fe ff ff e8 06 7d 17 00 48 c7 c7 60 79 94 8e 4c 89 f6 e8 27 33 74 03 e9 5b fa ff ff e8 ed 7c 17 00 90 <0f> 0b e8 f5 ea 43 0a 0f 1f 44 00 00 90 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffc90000007aa0 EFLAGS: 00010006 RAX: ffffffff817d37f3 RBX: ffff888000248f88 RCX: ffff88801f0e8000 RDX: 0000000000010000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: ffffc90000007bd0 R08: ffffffff817d34eb R09: 322e66313a30303a R10: dffffc0000000000 R11: fffff91ffff88a3a R12: 0000000000000008 R13: ffff8880126b5dc1 R14: ffff888000248fa8 R15: dffffc0000000000 FS: 00007f8d5c4c36c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f7f8d0c2723 CR3: 0000000035f9e000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 48 8b 3c 24 mov (%rsp),%rdi 4: e8 bb 71 9a 00 call 0x9a71c4 9: eb 8c jmp 0xffffff97 b: e9 ee fe ff ff jmp 0xfffffefe 10: 0f 1f 40 00 nopl 0x0(%rax) 14: 90 nop 15: 90 nop 16: 90 nop 17: 90 nop 18: 90 nop 19: 90 nop 1a: 90 nop 1b: 90 nop 1c: 90 nop 1d: 90 nop 1e: 90 nop 1f: 90 nop 20: 90 nop 21: 90 nop 22: 90 nop 23: 90 nop 24: f3 0f 1e fa endbr64 28: 41 57 push %r15 * 2a: 41 56 push %r14 <-- trapping instruction 2c: 53 push %rbx 2d: 89 fb mov %edi,%ebx 2f: 48 c7 c0 40 e9 3a 9a mov $0xffffffff9a3ae940,%rax 36: 48 c1 e8 03 shr $0x3,%rax 3a: 49 rex.WB 3b: bf 00 00 00 00 mov $0x0,%edi