loop0: detected capacity change from 0 to 8 SQUASHFS error: zlib decompression failed, data probably corrupt SQUASHFS error: Failed to read block 0x9b: -5 SQUASHFS error: Unable to read metadata cache entry [99] SQUASHFS error: Unable to read inode 0x127 loop0: detected capacity change from 0 to 2048 loop0: p2 p3 < > p4 < p5 > loop0: partition table partially beyond EOD, truncated loop0: p3 start 4284289 is beyond EOD, truncated ====================================================== WARNING: possible circular locking dependency detected 6.15.0-rc2-syzkaller-00278-gfc96b232f8e7 #0 Not tainted ------------------------------------------------------ syz.0.0/5335 is trying to acquire lock: ffff8880405ed0f8 (kn->active#5){++++}-{0:0}, at: __kernfs_remove+0x336/0x570 fs/kernfs/dir.c:1506 but task is already holding lock: ffff888000d6c358 (&disk->open_mutex){+.+.}-{4:4}, at: bdev_release+0x17e/0x700 block/bdev.c:1090 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&disk->open_mutex){+.+.}-{4:4}: lock_acquire+0x116/0x2f0 kernel/locking/lockdep.c:5866 __mutex_lock_common kernel/locking/mutex.c:601 [inline] __mutex_lock+0x1a5/0x10c0 kernel/locking/mutex.c:746 bdev_open+0xf7/0xcd0 block/bdev.c:907 bdev_file_open_by_dev+0x1b2/0x230 block/bdev.c:1021 disk_scan_partitions+0x1be/0x2b0 block/genhd.c:374 add_disk_fwnode+0xd26/0x1020 block/genhd.c:526 pmem_attach_disk+0xd42/0x1020 drivers/nvdimm/pmem.c:574 nvdimm_bus_probe+0x147/0x4e0 drivers/nvdimm/bus.c:94 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x2b9/0xad0 drivers/base/dd.c:658 __driver_probe_device+0x1a2/0x390 drivers/base/dd.c:800 driver_probe_device+0x50/0x430 drivers/base/dd.c:830 __driver_attach+0x45f/0x710 drivers/base/dd.c:1216 bus_for_each_dev+0x23e/0x2b0 drivers/base/bus.c:370 bus_add_driver+0x346/0x670 drivers/base/bus.c:678 driver_register+0x23a/0x320 drivers/base/driver.c:249 do_one_initcall+0x24a/0x940 init/main.c:1257 do_initcall_level+0x157/0x210 init/main.c:1319 do_initcalls+0x71/0xd0 init/main.c:1335 kernel_init_freeable+0x432/0x5d0 init/main.c:1567 kernel_init+0x1d/0x2b0 init/main.c:1457 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #1 (&nvdimm_namespace_key){+.+.}-{4:4}: lock_acquire+0x116/0x2f0 kernel/locking/lockdep.c:5866 __mutex_lock_common kernel/locking/mutex.c:601 [inline] __mutex_lock+0x1a5/0x10c0 kernel/locking/mutex.c:746 device_lock include/linux/device.h:922 [inline] uevent_show+0x17d/0x340 drivers/base/core.c:2730 dev_attr_show+0x55/0xc0 drivers/base/core.c:2424 sysfs_kf_seq_show+0x32b/0x4a0 fs/sysfs/file.c:65 seq_read_iter+0x461/0xda0 fs/seq_file.c:230 new_sync_read fs/read_write.c:489 [inline] vfs_read+0x9a0/0xb90 fs/read_write.c:570 ksys_read+0x19d/0x2d0 fs/read_write.c:713 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (kn->active#5){++++}-{0:0}: check_prev_add kernel/locking/lockdep.c:3166 [inline] check_prevs_add kernel/locking/lockdep.c:3285 [inline] validate_chain+0xa69/0x24e0 kernel/locking/lockdep.c:3909 __lock_acquire+0xad5/0xd80 kernel/locking/lockdep.c:5235 lock_acquire+0x116/0x2f0 kernel/locking/lockdep.c:5866 kernfs_drain+0x275/0x5e0 fs/kernfs/dir.c:511 __kernfs_remove+0x336/0x570 fs/kernfs/dir.c:1506 kernfs_remove_by_name_ns+0xad/0x130 fs/kernfs/dir.c:1714 sysfs_remove_file include/linux/sysfs.h:794 [inline] device_remove_file drivers/base/core.c:3048 [inline] device_del+0x56c/0x9b0 drivers/base/core.c:3853 drop_partition+0x11b/0x180 block/partitions/core.c:278 bdev_disk_changed+0x2ca/0x14e0 block/partitions/core.c:674 __loop_clr_fd drivers/block/loop.c:1205 [inline] lo_release+0x540/0x850 drivers/block/loop.c:1772 bdev_release+0x5dd/0x700 block/bdev.c:-1 blkdev_release+0x15/0x20 block/fops.c:660 __fput+0x3e9/0x9f0 fs/file_table.c:465 fput_close_sync+0x1ef/0x270 fs/file_table.c:570 __do_sys_close fs/open.c:1581 [inline] __se_sys_close fs/open.c:1566 [inline] __x64_sys_close+0x7f/0x110 fs/open.c:1566 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: kn->active#5 --> &nvdimm_namespace_key --> &disk->open_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&disk->open_mutex); lock(&nvdimm_namespace_key); lock(&disk->open_mutex); lock(kn->active#5); *** DEADLOCK *** 1 lock held by syz.0.0/5335: #0: ffff888000d6c358 (&disk->open_mutex){+.+.}-{4:4}, at: bdev_release+0x17e/0x700 block/bdev.c:1090 stack backtrace: CPU: 0 UID: 0 PID: 5335 Comm: syz.0.0 Not tainted 6.15.0-rc2-syzkaller-00278-gfc96b232f8e7 #0 PREEMPT(full) 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+0x241/0x360 lib/dump_stack.c:120 print_circular_bug+0x2e1/0x300 kernel/locking/lockdep.c:2079 check_noncircular+0x142/0x160 kernel/locking/lockdep.c:2211 check_prev_add kernel/locking/lockdep.c:3166 [inline] check_prevs_add kernel/locking/lockdep.c:3285 [inline] validate_chain+0xa69/0x24e0 kernel/locking/lockdep.c:3909 __lock_acquire+0xad5/0xd80 kernel/locking/lockdep.c:5235 lock_acquire+0x116/0x2f0 kernel/locking/lockdep.c:5866 kernfs_drain+0x275/0x5e0 fs/kernfs/dir.c:511 __kernfs_remove+0x336/0x570 fs/kernfs/dir.c:1506 kernfs_remove_by_name_ns+0xad/0x130 fs/kernfs/dir.c:1714 sysfs_remove_file include/linux/sysfs.h:794 [inline] device_remove_file drivers/base/core.c:3048 [inline] device_del+0x56c/0x9b0 drivers/base/core.c:3853 drop_partition+0x11b/0x180 block/partitions/core.c:278 bdev_disk_changed+0x2ca/0x14e0 block/partitions/core.c:674 __loop_clr_fd drivers/block/loop.c:1205 [inline] lo_release+0x540/0x850 drivers/block/loop.c:1772 bdev_release+0x5dd/0x700 block/bdev.c:-1 blkdev_release+0x15/0x20 block/fops.c:660 __fput+0x3e9/0x9f0 fs/file_table.c:465 fput_close_sync+0x1ef/0x270 fs/file_table.c:570 __do_sys_close fs/open.c:1581 [inline] __se_sys_close fs/open.c:1566 [inline] __x64_sys_close+0x7f/0x110 fs/open.c:1566 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f22baf8cdca Code: 48 3d 00 f0 ff ff 77 48 c3 0f 1f 80 00 00 00 00 48 83 ec 18 89 7c 24 0c e8 43 91 02 00 8b 7c 24 0c 89 c2 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 36 89 d7 89 44 24 0c e8 a3 91 02 00 8b 44 24 RSP: 002b:00007f22bbe6fe00 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 00007f22baf8cdca RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000006 RBP: 0000000000000010 R08: 0000000000000000 R09: 00000000000003df R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000005 R13: 00007f22bbe6fef0 R14: 00007f22bbe70668 R15: 00007f22aee00000