====================================================== WARNING: possible circular locking dependency detected 4.14.202-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.0/8006 is trying to acquire lock: (&bdev->bd_mutex){+.+.}, at: [] blkdev_put+0x27/0x4c0 fs/block_dev.c:1826 but task is already holding lock: (&type->s_umount_key#48){++++}, at: [] deactivate_super+0x77/0xa0 fs/super.c:349 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&type->s_umount_key#48){++++}: down_read+0x36/0x80 kernel/locking/rwsem.c:24 __get_super.part.0+0x271/0x390 fs/super.c:678 __get_super include/linux/spinlock.h:317 [inline] get_super+0x2b/0x50 fs/super.c:707 fsync_bdev+0x14/0xc0 fs/block_dev.c:495 invalidate_partition+0x74/0xb0 block/genhd.c:1506 drop_partitions.isra.0+0x83/0x150 block/partition-generic.c:442 rescan_partitions+0xa9/0x800 block/partition-generic.c:515 __blkdev_reread_part+0x140/0x1d0 block/ioctl.c:173 blkdev_reread_part+0x23/0x40 block/ioctl.c:193 loop_reread_partitions drivers/block/loop.c:624 [inline] loop_set_status+0xeeb/0x12b0 drivers/block/loop.c:1193 loop_set_status_old+0x18a/0x200 drivers/block/loop.c:1301 lo_ioctl+0x5ae/0x1cd0 drivers/block/loop.c:1431 __blkdev_driver_ioctl block/ioctl.c:297 [inline] blkdev_ioctl+0x540/0x1830 block/ioctl.c:594 block_ioctl+0xd9/0x120 fs/block_dev.c:1893 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb -> #0 (&bdev->bd_mutex){+.+.}: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 blkdev_put+0x27/0x4c0 fs/block_dev.c:1826 release_journal_dev fs/reiserfs/journal.c:2598 [inline] free_journal_ram+0x41a/0x5c0 fs/reiserfs/journal.c:1903 do_journal_release fs/reiserfs/journal.c:1969 [inline] journal_release+0x1cf/0x450 fs/reiserfs/journal.c:1980 reiserfs_put_super+0xbb/0x560 fs/reiserfs/super.c:616 generic_shutdown_super+0x144/0x370 fs/super.c:446 kill_block_super+0x95/0xe0 fs/super.c:1161 deactivate_locked_super+0x6c/0xd0 fs/super.c:319 deactivate_super+0x7f/0xa0 fs/super.c:350 cleanup_mnt+0x186/0x2c0 fs/namespace.c:1183 task_work_run+0x11f/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1ad/0x200 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x46/0xbb other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&type->s_umount_key#48); lock(&bdev->bd_mutex); lock(&type->s_umount_key#48); lock(&bdev->bd_mutex); *** DEADLOCK *** 1 lock held by syz-executor.0/8006: #0: (&type->s_umount_key#48){++++}, at: [] deactivate_super+0x77/0xa0 fs/super.c:349 stack backtrace: CPU: 0 PID: 8006 Comm: syz-executor.0 Not tainted 4.14.202-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x283 lib/dump_stack.c:58 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1258 check_prev_add kernel/locking/lockdep.c:1905 [inline] check_prevs_add kernel/locking/lockdep.c:2022 [inline] validate_chain kernel/locking/lockdep.c:2464 [inline] __lock_acquire+0x2e0e/0x3f20 kernel/locking/lockdep.c:3491 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 blkdev_put+0x27/0x4c0 fs/block_dev.c:1826 release_journal_dev fs/reiserfs/journal.c:2598 [inline] free_journal_ram+0x41a/0x5c0 fs/reiserfs/journal.c:1903 do_journal_release fs/reiserfs/journal.c:1969 [inline] journal_release+0x1cf/0x450 fs/reiserfs/journal.c:1980 reiserfs_put_super+0xbb/0x560 fs/reiserfs/super.c:616 generic_shutdown_super+0x144/0x370 fs/super.c:446 kill_block_super+0x95/0xe0 fs/super.c:1161 deactivate_locked_super+0x6c/0xd0 fs/super.c:319 deactivate_super+0x7f/0xa0 fs/super.c:350 cleanup_mnt+0x186/0x2c0 fs/namespace.c:1183 task_work_run+0x11f/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1ad/0x200 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x460877 RSP: 002b:00007ffc87716948 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00000000000245df RCX: 0000000000460877 RDX: 0000000000403188 RSI: 0000000000000002 RDI: 00007ffc877169f0 RBP: 0000000000000025 R08: 0000000000000000 R09: 000000000000000a R10: 0000000000000005 R11: 0000000000000246 R12: 00007ffc87717a80 R13: 0000000002914a60 R14: 0000000000000000 R15: 00007ffc87717a80 audit: type=1804 audit(1603795617.340:6): pid=10065 uid=0 auid=0 ses=4 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir583660353/syzkaller.R3kNGr/18/file0" dev="sda1" ino=15814 res=1 audit: type=1800 audit(1603795617.340:7): pid=10065 uid=0 auid=0 ses=4 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="file0" dev="sda1" ino=15814 res=0 netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. audit: type=1804 audit(1603795617.380:8): pid=10068 uid=0 auid=0 ses=4 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir327380414/syzkaller.8XJqHr/25/file0" dev="sda1" ino=15815 res=1 audit: type=1800 audit(1603795617.380:9): pid=10068 uid=0 auid=0 ses=4 op="collect_data" cause="failed(directio)" comm="syz-executor.5" name="file0" dev="sda1" ino=15815 res=0 netlink: 3 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. audit: type=1804 audit(1603795617.610:10): pid=10082 uid=0 auid=0 ses=4 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir583660353/syzkaller.R3kNGr/19/file0" dev="sda1" ino=15816 res=1 audit: type=1804 audit(1603795617.610:11): pid=10079 uid=0 auid=0 ses=4 op="invalid_pcr" cause="open_writers" comm="syz-executor.3" name="/root/syzkaller-testdir117361056/syzkaller.Ccfj5q/20/file0" dev="sda1" ino=15814 res=1 netlink: 3 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor.4'. SQUASHFS error: squashfs_read_data failed to read block 0x1fe squashfs: SQUASHFS error: unable to read xattr id index table SQUASHFS error: squashfs_read_data failed to read block 0x1fe squashfs: SQUASHFS error: unable to read xattr id index table SQUASHFS error: squashfs_read_data failed to read block 0x1fe squashfs: SQUASHFS error: unable to read xattr id index table SQUASHFS error: squashfs_read_data failed to read block 0x1fe squashfs: SQUASHFS error: unable to read xattr id index table SQUASHFS error: squashfs_read_data failed to read block 0x1fe squashfs: SQUASHFS error: unable to read xattr id index table netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 4 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 4 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 4 bytes leftover after parsing attributes in process `syz-executor.5'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 4 bytes leftover after parsing attributes in process `syz-executor.5'. netlink: 4 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 4 bytes leftover after parsing attributes in process `syz-executor.5'. UDF-fs: warning (device loop4): udf_load_vrs: No VRS found UDF-fs: Scanning with blocksize 512 failed UDF-fs: warning (device loop4): udf_load_vrs: No VRS found