EXT4-fs (sda1): shut down requested (2) ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Tainted: G L ------------------------------------------------------ syz.0.1679/18112 is trying to acquire lock: ffff88801d2c4aa0 (&root->kernfs_supers_rwsem){++++}-{4:4}, at: kernfs_remove fs/kernfs/dir.c:1622 [inline] ffff88801d2c4aa0 (&root->kernfs_supers_rwsem){++++}-{4:4}, at: kernfs_remove+0x3b/0x70 fs/kernfs/dir.c:1613 but task is already holding lock: ffff88802888a5d8 (&q->q_usage_counter(queue)#50){++++}-{0:0}, at: del_gendisk+0x10e/0x1b0 block/genhd.c:827 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #5 (&q->q_usage_counter(queue)#50){++++}-{0:0}: lock_acquire kernel/locking/lockdep.c:5942 [inline] lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899 blk_queue_enter+0x67b/0x800 block/blk-core.c:371 blk_mq_alloc_request+0x687/0x960 block/blk-mq.c:681 scsi_alloc_request drivers/scsi/scsi_lib.c:1278 [inline] scsi_execute_cmd+0x1a3/0xe70 drivers/scsi/scsi_lib.c:313 read_capacity_16+0x214/0xe20 drivers/scsi/sd.c:2746 sd_read_capacity drivers/scsi/sd.c:2915 [inline] sd_revalidate_disk+0x13cd/0xa580 drivers/scsi/sd.c:3810 sd_probe+0x915/0x11b0 drivers/scsi/sd.c:4101 scsi_bus_probe+0x6d/0x90 drivers/scsi/scsi_sysfs.c:564 call_driver_probe drivers/base/dd.c:628 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:706 __driver_probe_device+0x210/0x460 drivers/base/dd.c:868 driver_probe_device+0x4a/0x140 drivers/base/dd.c:898 __device_attach_driver+0x1df/0x320 drivers/base/dd.c:1026 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach_async_helper+0x1d1/0x2b0 drivers/base/dd.c:1055 async_run_entry_fn+0x9f/0x580 kernel/async.c:129 process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396 process_scheduled_works kernel/workqueue.c:3479 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3560 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #4 (&q->limits_lock){+.+.}-{4:4}: lock_acquire kernel/locking/lockdep.c:5942 [inline] lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899 __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821 queue_limits_start_update include/linux/blkdev.h:1101 [inline] disk_update_zone_resources+0xd6/0x740 block/blk-zoned.c:2072 blk_revalidate_disk_zones+0x55c/0xcf0 block/blk-zoned.c:2386 nvme_mpath_revalidate_zones+0x10b/0x1a0 drivers/nvme/host/multipath.c:301 nvme_update_ns_info+0x9ff/0xd90 drivers/nvme/host/core.c:2620 nvme_alloc_ns+0x1a9f/0x3e50 drivers/nvme/host/core.c:4293 nvme_scan_ns+0x79d/0x910 drivers/nvme/host/core.c:4483 async_run_entry_fn+0x9f/0x580 kernel/async.c:129 process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396 process_scheduled_works kernel/workqueue.c:3479 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3560 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #3 (&q->q_usage_counter(io)#74){++++}-{0:0}: lock_acquire kernel/locking/lockdep.c:5942 [inline] lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899 blk_alloc_queue+0x610/0x790 block/blk-core.c:504 __blk_alloc_disk+0xa0/0x170 block/genhd.c:1527 nvme_mpath_alloc_disk+0x54f/0x9c0 drivers/nvme/host/multipath.c:769 nvme_alloc_ns_head drivers/nvme/host/core.c:4049 [inline] nvme_init_ns_head drivers/nvme/host/core.c:4153 [inline] nvme_alloc_ns+0x119c/0x3e50 drivers/nvme/host/core.c:4267 nvme_scan_ns+0x79d/0x910 drivers/nvme/host/core.c:4483 async_run_entry_fn+0x9f/0x580 kernel/async.c:129 process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396 process_scheduled_works kernel/workqueue.c:3479 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3560 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #2 (fs_reclaim){+.+.}-{0:0}: lock_acquire kernel/locking/lockdep.c:5942 [inline] lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899 __fs_reclaim_acquire mm/page_alloc.c:4375 [inline] fs_reclaim_acquire+0xc4/0x100 mm/page_alloc.c:4389 might_alloc include/linux/sched/mm.h:316 [inline] slab_pre_alloc_hook mm/slub.c:4636 [inline] slab_alloc_node mm/slub.c:4974 [inline] kmem_cache_alloc_lru_noprof+0x5f/0x6a0 mm/slub.c:5029 alloc_inode+0x183/0x250 fs/inode.c:340 iget_locked+0x1d9/0x6d0 fs/inode.c:1472 kernfs_get_inode+0x46/0x470 fs/kernfs/inode.c:250 kernfs_fill_super fs/kernfs/mount.c:308 [inline] kernfs_get_tree+0x636/0xbb0 fs/kernfs/mount.c:392 vfs_get_tree+0x92/0x320 fs/super.c:1932 fc_mount fs/namespace.c:1198 [inline] do_new_mount_fc fs/namespace.c:3772 [inline] do_new_mount fs/namespace.c:3848 [inline] path_mount+0x7d0/0x24c0 fs/namespace.c:4168 do_mount fs/namespace.c:4181 [inline] __do_sys_mount fs/namespace.c:4397 [inline] __se_sys_mount fs/namespace.c:4374 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:4374 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (&root->kernfs_rwsem){++++}-{4:4}: lock_acquire kernel/locking/lockdep.c:5942 [inline] lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899 down_write+0x8b/0x1f0 kernel/locking/rwsem.c:1631 kernfs_remove_by_name_ns+0x51/0x120 fs/kernfs/dir.c:1792 sysfs_remove_file include/linux/sysfs.h:780 [inline] device_remove_file drivers/base/core.c:3146 [inline] device_remove_file drivers/base/core.c:3142 [inline] device_links_driver_bound+0xed/0xca0 drivers/base/core.c:1397 driver_bound+0xf0/0x220 drivers/base/dd.c:457 really_probe+0x3d4/0xa60 drivers/base/dd.c:756 __driver_probe_device+0x210/0x460 drivers/base/dd.c:868 driver_probe_device+0x4a/0x140 drivers/base/dd.c:898 __device_attach_driver+0x1df/0x320 drivers/base/dd.c:1026 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4d0 drivers/base/dd.c:1098 device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1153 bus_probe_device+0x64/0x160 drivers/base/bus.c:620 device_add+0x121d/0x1970 drivers/base/core.c:3776 faux_device_create_with_groups+0x1d9/0x300 drivers/base/faux.c:161 regulator_dummy_init+0x1e/0x40 drivers/regulator/dummy.c:67 regulator_init+0x14e/0x180 drivers/regulator/core.c:6790 do_one_initcall+0x11c/0x6f0 init/main.c:1362 do_initcall_level init/main.c:1424 [inline] do_initcalls init/main.c:1440 [inline] do_basic_setup init/main.c:1460 [inline] kernel_init_freeable+0x6ea/0x7b0 init/main.c:1675 kernel_init+0x21/0x1e0 init/main.c:1565 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #0 (&root->kernfs_supers_rwsem){++++}-{4:4}: check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3209 check_prevs_add kernel/locking/lockdep.c:3328 [inline] validate_chain kernel/locking/lockdep.c:3952 [inline] __lock_acquire+0x1528/0x1f40 kernel/locking/lockdep.c:5288 lock_acquire kernel/locking/lockdep.c:5942 [inline] lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899 down_read+0x99/0x4c0 kernel/locking/rwsem.c:1574 kernfs_remove fs/kernfs/dir.c:1622 [inline] kernfs_remove+0x3b/0x70 fs/kernfs/dir.c:1613 sysfs_remove_dir+0xc8/0x110 fs/sysfs/dir.c:101 __kobject_del+0xe2/0x220 lib/kobject.c:604 kobject_cleanup lib/kobject.c:680 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x348/0x640 lib/kobject.c:737 drop_partition+0x101/0x1c0 block/partitions/core.c:278 __del_gendisk+0x261/0xb20 block/genhd.c:734 del_gendisk+0x10e/0x1b0 block/genhd.c:827 sd_remove+0x95/0x240 drivers/scsi/sd.c:4276 scsi_bus_remove+0x68/0x90 drivers/scsi/scsi_sysfs.c:575 device_remove+0xcb/0x180 drivers/base/dd.c:616 __device_release_driver drivers/base/dd.c:1349 [inline] device_release_driver_internal+0x44e/0x620 drivers/base/dd.c:1372 bus_remove_device+0x2bc/0x560 drivers/base/bus.c:664 device_del+0x376/0x9b0 drivers/base/core.c:3965 __scsi_remove_device+0x359/0x430 drivers/scsi/scsi_sysfs.c:1499 scsi_forget_host+0x66/0x230 drivers/scsi/scsi_scan.c:2115 scsi_remove_host+0xf8/0x320 drivers/scsi/hosts.c:182 virtscsi_remove+0xca/0x170 drivers/scsi/virtio_scsi.c:1007 virtio_dev_remove+0xb8/0x170 drivers/virtio/virtio.c:375 device_remove+0xcb/0x180 drivers/base/dd.c:616 __device_release_driver drivers/base/dd.c:1349 [inline] device_release_driver_internal+0x44e/0x620 drivers/base/dd.c:1372 bus_remove_device+0x2bc/0x560 drivers/base/bus.c:664 device_del+0x376/0x9b0 drivers/base/core.c:3965 device_unregister+0x1d/0xe0 drivers/base/core.c:4006 unregister_virtio_device+0x39/0x60 drivers/virtio/virtio.c:608 virtio_pci_remove+0x7c/0x110 drivers/virtio/virtio_pci_common.c:760 pci_device_remove+0xb2/0x1d0 drivers/pci/pci-driver.c:535 device_remove+0xcb/0x180 drivers/base/dd.c:616 __device_release_driver drivers/base/dd.c:1349 [inline] device_release_driver_internal+0x44e/0x620 drivers/base/dd.c:1372 pci_stop_dev drivers/pci/remove.c:27 [inline] pci_stop_bus_device+0x120/0x160 drivers/pci/remove.c:94 pci_stop_and_remove_bus_device+0x58/0xa0 drivers/pci/remove.c:129 pci_stop_and_remove_bus_device_locked+0x1a/0x20 drivers/pci/remove.c:137 remove_store+0x123/0x140 drivers/pci/pci-sysfs.c:524 dev_attr_store+0x58/0x80 drivers/base/core.c:2509 sysfs_kf_write+0xf2/0x150 fs/sysfs/file.c:145 kernfs_fop_write_iter+0x3e0/0x5f0 fs/kernfs/file.c:345 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x6af/0x1050 fs/read_write.c:687 ksys_write+0x12a/0x250 fs/read_write.c:739 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: &root->kernfs_supers_rwsem --> &q->limits_lock --> &q->q_usage_counter(queue)#50 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&q->q_usage_counter(queue)#50); lock(&q->limits_lock); lock(&q->q_usage_counter(queue)#50); rlock(&root->kernfs_supers_rwsem); *** DEADLOCK *** locks held by syz.0.1679/18112: 11, last CPU#0: #0: ffff88802781f5f0 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x2aa/0x380 fs/file.c:1259 #1: ffff888034098460 (sb_writers#7){.+.+}-{0:0}, at: ksys_write+0x12a/0x250 fs/read_write.c:739 #2: ffff88805aaeec80 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x2c2/0x5f0 fs/kernfs/file.c:336 #3: ffffffff8fa9a660 (pci_rescan_remove_lock){+.+.}-{4:4}, at: pci_stop_and_remove_bus_device_locked+0x12/0x20 drivers/pci/remove.c:136 #4: ffff888023ea61f8 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1104 [inline] #4: ffff888023ea61f8 (&dev->mutex){....}-{4:4}, at: __device_driver_lock drivers/base/dd.c:1171 [inline] #4: ffff888023ea61f8 (&dev->mutex){....}-{4:4}, at: device_release_driver_internal+0xb2/0x620 drivers/base/dd.c:1369 #5: ffff88801fb551b0 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1104 [inline] #5: ffff88801fb551b0 (&dev->mutex){....}-{4:4}, at: __device_driver_lock drivers/base/dd.c:1171 [inline] #5: ffff88801fb551b0 (&dev->mutex){....}-{4:4}, at: device_release_driver_internal+0xb2/0x620 drivers/base/dd.c:1369 #6: ffff888023f740d8 (&shost->scan_mutex){+.+.}-{4:4}, at: scsi_remove_host+0x26/0x320 drivers/scsi/hosts.c:170 #7: ffff8880288223c0 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1104 [inline] #7: ffff8880288223c0 (&dev->mutex){....}-{4:4}, at: __device_driver_lock drivers/base/dd.c:1171 [inline] #7: ffff8880288223c0 (&dev->mutex){....}-{4:4}, at: device_release_driver_internal+0xb2/0x620 drivers/base/dd.c:1369 #8: ffff888023f743b0 (&set->update_nr_hwq_lock){++++}-{4:4}, at: del_gendisk+0x106/0x1b0 block/genhd.c:826 #9: ffff88802a2e9350 (&disk->open_mutex){+.+.}-{4:4}, at: __del_gendisk+0x20a/0xb20 block/genhd.c:729 #10: ffff88802888a5d8 (&q->q_usage_counter(queue)#50){++++}-{0:0}, at: del_gendisk+0x10e/0x1b0 block/genhd.c:827 stack backtrace: CPU: 0 UID: 0 PID: 18112 Comm: syz.0.1679 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_circular_bug.cold+0x178/0x1be kernel/locking/lockdep.c:2087 check_noncircular+0x146/0x160 kernel/locking/lockdep.c:2219 check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3209 check_prevs_add kernel/locking/lockdep.c:3328 [inline] validate_chain kernel/locking/lockdep.c:3952 [inline] __lock_acquire+0x1528/0x1f40 kernel/locking/lockdep.c:5288 lock_acquire kernel/locking/lockdep.c:5942 [inline] lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899 down_read+0x99/0x4c0 kernel/locking/rwsem.c:1574 kernfs_remove fs/kernfs/dir.c:1622 [inline] kernfs_remove+0x3b/0x70 fs/kernfs/dir.c:1613 sysfs_remove_dir+0xc8/0x110 fs/sysfs/dir.c:101 __kobject_del+0xe2/0x220 lib/kobject.c:604 kobject_cleanup lib/kobject.c:680 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x348/0x640 lib/kobject.c:737 drop_partition+0x101/0x1c0 block/partitions/core.c:278 __del_gendisk+0x261/0xb20 block/genhd.c:734 del_gendisk+0x10e/0x1b0 block/genhd.c:827 sd_remove+0x95/0x240 drivers/scsi/sd.c:4276 scsi_bus_remove+0x68/0x90 drivers/scsi/scsi_sysfs.c:575 device_remove+0xcb/0x180 drivers/base/dd.c:616 __device_release_driver drivers/base/dd.c:1349 [inline] device_release_driver_internal+0x44e/0x620 drivers/base/dd.c:1372 bus_remove_device+0x2bc/0x560 drivers/base/bus.c:664 device_del+0x376/0x9b0 drivers/base/core.c:3965 __scsi_remove_device+0x359/0x430 drivers/scsi/scsi_sysfs.c:1499 scsi_forget_host+0x66/0x230 drivers/scsi/scsi_scan.c:2115 scsi_remove_host+0xf8/0x320 drivers/scsi/hosts.c:182 virtscsi_remove+0xca/0x170 drivers/scsi/virtio_scsi.c:1007 virtio_dev_remove+0xb8/0x170 drivers/virtio/virtio.c:375 device_remove+0xcb/0x180 drivers/base/dd.c:616 __device_release_driver drivers/base/dd.c:1349 [inline] device_release_driver_internal+0x44e/0x620 drivers/base/dd.c:1372 bus_remove_device+0x2bc/0x560 drivers/base/bus.c:664 device_del+0x376/0x9b0 drivers/base/core.c:3965 device_unregister+0x1d/0xe0 drivers/base/core.c:4006 unregister_virtio_device+0x39/0x60 drivers/virtio/virtio.c:608 virtio_pci_remove+0x7c/0x110 drivers/virtio/virtio_pci_common.c:760 pci_device_remove+0xb2/0x1d0 drivers/pci/pci-driver.c:535 device_remove+0xcb/0x180 drivers/base/dd.c:616 __device_release_driver drivers/base/dd.c:1349 [inline] device_release_driver_internal+0x44e/0x620 drivers/base/dd.c:1372 pci_stop_dev drivers/pci/remove.c:27 [inline] pci_stop_bus_device+0x120/0x160 drivers/pci/remove.c:94 pci_stop_and_remove_bus_device+0x58/0xa0 drivers/pci/remove.c:129 pci_stop_and_remove_bus_device_locked+0x1a/0x20 drivers/pci/remove.c:137 remove_store+0x123/0x140 drivers/pci/pci-sysfs.c:524 dev_attr_store+0x58/0x80 drivers/base/core.c:2509 sysfs_kf_write+0xf2/0x150 fs/sysfs/file.c:145 kernfs_fop_write_iter+0x3e0/0x5f0 fs/kernfs/file.c:345 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x6af/0x1050 fs/read_write.c:687 ksys_write+0x12a/0x250 fs/read_write.c:739 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fcd8e59e159 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fcd8f458028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fcd8e825fa0 RCX: 00007fcd8e59e159 RDX: 0000000000000001 RSI: 0000200000000140 RDI: 0000000000000003 RBP: 00007fcd8e63506b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fcd8e826038 R14: 00007fcd8e825fa0 R15: 00007ffcb6100c08 sd 0:0:1:0: [sda] Synchronizing SCSI cache