====================================================== WARNING: possible circular locking dependency detected 6.12.0-syzkaller-00971-g158f238aa69d #0 Not tainted ------------------------------------------------------ syz.2.44/6179 is trying to acquire lock: ffff8880405f9e00 (&q->q_usage_counter(io)#68){++++}-{0:0}, at: bio_queue_enter block/blk.h:79 [inline] ffff8880405f9e00 (&q->q_usage_counter(io)#68){++++}-{0:0}, at: blk_mq_submit_bio+0x7ca/0x24b0 block/blk-mq.c:3092 but task is already holding lock: ffffffff8df46ac0 (fs_reclaim){+.+.}-{0:0}, at: __perform_reclaim mm/page_alloc.c:3924 [inline] ffffffff8df46ac0 (fs_reclaim){+.+.}-{0:0}, at: __alloc_pages_direct_reclaim mm/page_alloc.c:3949 [inline] ffffffff8df46ac0 (fs_reclaim){+.+.}-{0:0}, at: __alloc_pages_slowpath mm/page_alloc.c:4380 [inline] ffffffff8df46ac0 (fs_reclaim){+.+.}-{0:0}, at: __alloc_pages_noprof+0xa94/0x25a0 mm/page_alloc.c:4764 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (fs_reclaim){+.+.}-{0:0}: __fs_reclaim_acquire mm/page_alloc.c:3851 [inline] fs_reclaim_acquire+0x102/0x150 mm/page_alloc.c:3865 might_alloc include/linux/sched/mm.h:318 [inline] slab_pre_alloc_hook mm/slub.c:4036 [inline] slab_alloc_node mm/slub.c:4114 [inline] __do_kmalloc_node mm/slub.c:4263 [inline] __kmalloc_node_noprof+0xb7/0x440 mm/slub.c:4270 __kvmalloc_node_noprof+0xad/0x1a0 mm/util.c:658 sbitmap_init_node+0x1ca/0x770 lib/sbitmap.c:132 scsi_realloc_sdev_budget_map+0x2c7/0x610 drivers/scsi/scsi_scan.c:246 scsi_add_lun+0x11b4/0x1fd0 drivers/scsi/scsi_scan.c:1106 scsi_probe_and_add_lun+0x4fa/0xda0 drivers/scsi/scsi_scan.c:1287 __scsi_add_device+0x24b/0x290 drivers/scsi/scsi_scan.c:1622 ata_scsi_scan_host+0x215/0x780 drivers/ata/libata-scsi.c:4575 async_run_entry_fn+0x9c/0x530 kernel/async.c:129 process_one_work+0x958/0x1b30 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 -> #0 (&q->q_usage_counter(io)#68){++++}-{0:0}: check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain kernel/locking/lockdep.c:3904 [inline] __lock_acquire+0x250b/0x3ce0 kernel/locking/lockdep.c:5202 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825 __bio_queue_enter+0x4c6/0x740 block/blk-core.c:361 bio_queue_enter block/blk.h:79 [inline] blk_mq_submit_bio+0x7ca/0x24b0 block/blk-mq.c:3092 __submit_bio+0x384/0x540 block/blk-core.c:629 __submit_bio_noacct_mq block/blk-core.c:710 [inline] submit_bio_noacct_nocheck+0x6fb/0xd70 block/blk-core.c:739 submit_bio_noacct+0x93a/0x1e10 block/blk-core.c:868 swap_writepage_bdev_async mm/page_io.c:449 [inline] __swap_writepage+0x3a3/0xf50 mm/page_io.c:472 swap_writepage+0x403/0x1040 mm/page_io.c:288 pageout+0x3b2/0xaa0 mm/vmscan.c:689 shrink_folio_list+0x3025/0x42d0 mm/vmscan.c:1367 evict_folios+0x6d6/0x1970 mm/vmscan.c:4589 try_to_shrink_lruvec+0x612/0x9b0 mm/vmscan.c:4784 shrink_one+0x3e3/0x7b0 mm/vmscan.c:4822 shrink_many mm/vmscan.c:4885 [inline] lru_gen_shrink_node mm/vmscan.c:4963 [inline] shrink_node+0xbbc/0x3ed0 mm/vmscan.c:5943 shrink_zones mm/vmscan.c:6201 [inline] do_try_to_free_pages+0x35f/0x1a30 mm/vmscan.c:6263 try_to_free_pages+0x2ae/0x6b0 mm/vmscan.c:6513 __perform_reclaim mm/page_alloc.c:3927 [inline] __alloc_pages_direct_reclaim mm/page_alloc.c:3949 [inline] __alloc_pages_slowpath mm/page_alloc.c:4380 [inline] __alloc_pages_noprof+0xb15/0x25a0 mm/page_alloc.c:4764 __folio_alloc_noprof+0x11/0x90 mm/page_alloc.c:4783 alloc_charge_folio+0x2bd/0x980 mm/khugepaged.c:1072 collapse_file+0x1c7/0x2f30 mm/khugepaged.c:1821 hpage_collapse_scan_file+0x7f8/0xcf0 mm/khugepaged.c:2317 madvise_collapse+0x4c5/0xac0 mm/khugepaged.c:2759 madvise_vma_behavior+0x390/0x19e0 mm/madvise.c:1100 madvise_walk_vmas+0x1cf/0x2c0 mm/madvise.c:1274 do_madvise+0x2c7/0x760 mm/madvise.c:1461 __do_sys_madvise mm/madvise.c:1477 [inline] __se_sys_madvise mm/madvise.c:1475 [inline] __ia32_sys_madvise+0xa7/0x110 mm/madvise.c:1475 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(fs_reclaim); lock(&q->q_usage_counter(io)#68); lock(fs_reclaim); rlock(&q->q_usage_counter(io)#68); *** DEADLOCK *** 1 lock held by syz.2.44/6179: #0: ffffffff8df46ac0 (fs_reclaim){+.+.}-{0:0}, at: __perform_reclaim mm/page_alloc.c:3924 [inline] #0: ffffffff8df46ac0 (fs_reclaim){+.+.}-{0:0}, at: __alloc_pages_direct_reclaim mm/page_alloc.c:3949 [inline] #0: ffffffff8df46ac0 (fs_reclaim){+.+.}-{0:0}, at: __alloc_pages_slowpath mm/page_alloc.c:4380 [inline] #0: ffffffff8df46ac0 (fs_reclaim){+.+.}-{0:0}, at: __alloc_pages_noprof+0xa94/0x25a0 mm/page_alloc.c:4764 stack backtrace: CPU: 1 UID: 0 PID: 6179 Comm: syz.2.44 Not tainted 6.12.0-syzkaller-00971-g158f238aa69d #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_circular_bug+0x419/0x5d0 kernel/locking/lockdep.c:2074 check_noncircular+0x31a/0x400 kernel/locking/lockdep.c:2206 check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain kernel/locking/lockdep.c:3904 [inline] __lock_acquire+0x250b/0x3ce0 kernel/locking/lockdep.c:5202 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825 __bio_queue_enter+0x4c6/0x740 block/blk-core.c:361 bio_queue_enter block/blk.h:79 [inline] blk_mq_submit_bio+0x7ca/0x24b0 block/blk-mq.c:3092 __submit_bio+0x384/0x540 block/blk-core.c:629 __submit_bio_noacct_mq block/blk-core.c:710 [inline] submit_bio_noacct_nocheck+0x6fb/0xd70 block/blk-core.c:739 submit_bio_noacct+0x93a/0x1e10 block/blk-core.c:868 swap_writepage_bdev_async mm/page_io.c:449 [inline] __swap_writepage+0x3a3/0xf50 mm/page_io.c:472 swap_writepage+0x403/0x1040 mm/page_io.c:288 pageout+0x3b2/0xaa0 mm/vmscan.c:689 shrink_folio_list+0x3025/0x42d0 mm/vmscan.c:1367 evict_folios+0x6d6/0x1970 mm/vmscan.c:4589 try_to_shrink_lruvec+0x612/0x9b0 mm/vmscan.c:4784 shrink_one+0x3e3/0x7b0 mm/vmscan.c:4822 shrink_many mm/vmscan.c:4885 [inline] lru_gen_shrink_node mm/vmscan.c:4963 [inline] shrink_node+0xbbc/0x3ed0 mm/vmscan.c:5943 shrink_zones mm/vmscan.c:6201 [inline] do_try_to_free_pages+0x35f/0x1a30 mm/vmscan.c:6263 try_to_free_pages+0x2ae/0x6b0 mm/vmscan.c:6513 __perform_reclaim mm/page_alloc.c:3927 [inline] __alloc_pages_direct_reclaim mm/page_alloc.c:3949 [inline] __alloc_pages_slowpath mm/page_alloc.c:4380 [inline] __alloc_pages_noprof+0xb15/0x25a0 mm/page_alloc.c:4764 __folio_alloc_noprof+0x11/0x90 mm/page_alloc.c:4783 alloc_charge_folio+0x2bd/0x980 mm/khugepaged.c:1072 collapse_file+0x1c7/0x2f30 mm/khugepaged.c:1821 hpage_collapse_scan_file+0x7f8/0xcf0 mm/khugepaged.c:2317 madvise_collapse+0x4c5/0xac0 mm/khugepaged.c:2759 madvise_vma_behavior+0x390/0x19e0 mm/madvise.c:1100 madvise_walk_vmas+0x1cf/0x2c0 mm/madvise.c:1274 do_madvise+0x2c7/0x760 mm/madvise.c:1461 __do_sys_madvise mm/madvise.c:1477 [inline] __se_sys_madvise mm/madvise.c:1475 [inline] __ia32_sys_madvise+0xa7/0x110 mm/madvise.c:1475 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf73ce579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f56b655c EFLAGS: 00000296 ORIG_RAX: 00000000000000db RAX: ffffffffffffffda RBX: 0000000020000000 RCX: 0000000000600722 RDX: 0000000000000019 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 9pnet: Could not find request transport: —cù´_fd syz.2.44 (6179) used greatest stack depth: 20624 bytes left ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 10 06 adc %al,(%rsi) 2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 6: 10 07 adc %al,(%rdi) 8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi c: 10 08 adc %cl,(%rax) e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1e: 00 51 52 add %dl,0x52(%rcx) 21: 55 push %rbp 22: 89 e5 mov %esp,%ebp 24: 0f 34 sysenter 26: cd 80 int $0x80 * 28: 5d pop %rbp <-- trapping instruction 29: 5a pop %rdx 2a: 59 pop %rcx 2b: c3 ret 2c: 90 nop 2d: 90 nop 2e: 90 nop 2f: 90 nop 30: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi