===================================================== WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected 5.0.0-rc4 #49 Not tainted ----------------------------------------------------- syz-executor1/19892 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire: 0000000031c19e13 (&ctx->fault_pending_wqh){+.+.}, at: spin_lock include/linux/spinlock.h:329 [inline] 0000000031c19e13 (&ctx->fault_pending_wqh){+.+.}, at: userfaultfd_ctx_read+0x690/0x2060 fs/userfaultfd.c:1040 and this task is already holding: 00000000f07a138a (&ctx->fd_wqh){....}, at: spin_lock_irq include/linux/spinlock.h:354 [inline] 00000000f07a138a (&ctx->fd_wqh){....}, at: userfaultfd_ctx_read+0x25e/0x2060 fs/userfaultfd.c:1036 which would create a new lock dependency: (&ctx->fd_wqh){....} -> (&ctx->fault_pending_wqh){+.+.} but this new dependency connects a SOFTIRQ-irq-safe lock: (&(&ctx->ctx_lock)->rlock){..-.} ... which became SOFTIRQ-irq-safe at: lock_acquire+0x1db/0x570 kernel/locking/lockdep.c:3841 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:128 [inline] _raw_spin_lock_irq+0x60/0x80 kernel/locking/spinlock.c:160 spin_lock_irq include/linux/spinlock.h:354 [inline] free_ioctx_users+0xa7/0x6e0 fs/aio.c:610 percpu_ref_put_many include/linux/percpu-refcount.h:285 [inline] percpu_ref_put include/linux/percpu-refcount.h:301 [inline] percpu_ref_call_confirm_rcu lib/percpu-refcount.c:123 [inline] percpu_ref_switch_to_atomic_rcu+0x50c/0x6b0 lib/percpu-refcount.c:158 __rcu_reclaim kernel/rcu/rcu.h:240 [inline] rcu_do_batch kernel/rcu/tree.c:2452 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2773 [inline] rcu_process_callbacks+0xc4a/0x1680 kernel/rcu/tree.c:2754 __do_softirq+0x30b/0xb11 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x180/0x1d0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x1b7/0x760 arch/x86/kernel/apic/apic.c:1062 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:807 arch_local_irq_restore arch/x86/include/asm/paravirt.h:766 [inline] free_unref_page_list+0xb81/0x10e0 mm/page_alloc.c:2911 release_pages+0x995/0x2840 mm/swap.c:791 __pagevec_release+0x88/0x120 mm/swap.c:811 pagevec_release include/linux/pagevec.h:88 [inline] truncate_inode_pages_range+0xdc6/0x2ad0 mm/truncate.c:369 truncate_inode_pages mm/truncate.c:475 [inline] truncate_inode_pages_final+0x8e/0xd0 mm/truncate.c:526 fat_evict_inode+0x26/0x270 fs/fat/inode.c:646 evict+0x49b/0x940 fs/inode.c:558 dispose_list+0x243/0x400 fs/inode.c:593 evict_inodes+0x49d/0x600 fs/inode.c:643 generic_shutdown_super+0x119/0x530 fs/super.c:449 kill_block_super+0xa0/0x100 fs/super.c:1186 deactivate_locked_super+0x9a/0x100 fs/super.c:330 deactivate_super fs/super.c:361 [inline] deactivate_super+0x2b1/0x320 fs/super.c:357 cleanup_mnt+0xbf/0x160 fs/namespace.c:1096 __cleanup_mnt+0x16/0x20 fs/namespace.c:1103 task_work_run+0x1f4/0x2b0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x32a/0x3b0 arch/x86/entry/common.c:166 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x696/0x800 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe to a SOFTIRQ-irq-unsafe lock: (&ctx->fault_pending_wqh){+.+.} ... which became SOFTIRQ-irq-unsafe at: ... lock_acquire+0x1db/0x570 kernel/locking/lockdep.c:3841 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] handle_userfault+0x901/0x2510 fs/userfaultfd.c:461 __do_huge_pmd_anonymous_page mm/huge_memory.c:603 [inline] do_huge_pmd_anonymous_page+0xb4e/0x17f0 mm/huge_memory.c:744 create_huge_pmd mm/memory.c:3678 [inline] __handle_mm_fault+0x385a/0x55a0 mm/memory.c:3882 handle_mm_fault+0x4ec/0xc80 mm/memory.c:3948 do_user_addr_fault arch/x86/mm/fault.c:1475 [inline] __do_page_fault+0x5da/0xd60 arch/x86/mm/fault.c:1541 do_page_fault+0xe6/0x7d8 arch/x86/mm/fault.c:1572 page_fault+0x1e/0x30 arch/x86/entry/entry_64.S:1143 copy_user_generic_unrolled+0x89/0xc0 arch/x86/lib/copy_user_64.S:66 copy_to_user include/linux/uaccess.h:152 [inline] perf_read_one kernel/events/core.c:4802 [inline] __perf_read kernel/events/core.c:4845 [inline] perf_read+0x6dd/0xa40 kernel/events/core.c:4858 __vfs_read+0x116/0xb20 fs/read_write.c:416 vfs_read+0x194/0x3e0 fs/read_write.c:452 ksys_read+0x105/0x260 fs/read_write.c:578 __do_sys_read fs/read_write.c:588 [inline] __se_sys_read fs/read_write.c:586 [inline] __x64_sys_read+0x73/0xb0 fs/read_write.c:586 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Chain exists of: &(&ctx->ctx_lock)->rlock --> &ctx->fd_wqh --> &ctx->fault_pending_wqh Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ctx->fault_pending_wqh); local_irq_disable(); lock(&(&ctx->ctx_lock)->rlock); lock(&ctx->fd_wqh); lock(&(&ctx->ctx_lock)->rlock); *** DEADLOCK *** 1 lock held by syz-executor1/19892: #0: 00000000f07a138a (&ctx->fd_wqh){....}, at: spin_lock_irq include/linux/spinlock.h:354 [inline] #0: 00000000f07a138a (&ctx->fd_wqh){....}, at: userfaultfd_ctx_read+0x25e/0x2060 fs/userfaultfd.c:1036 the dependencies between SOFTIRQ-irq-safe lock and the holding lock: -> (&(&ctx->ctx_lock)->rlock){..-.} { IN-SOFTIRQ-W at: lock_acquire+0x1db/0x570 kernel/locking/lockdep.c:3841 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:128 [inline] _raw_spin_lock_irq+0x60/0x80 kernel/locking/spinlock.c:160 spin_lock_irq include/linux/spinlock.h:354 [inline] free_ioctx_users+0xa7/0x6e0 fs/aio.c:610 percpu_ref_put_many include/linux/percpu-refcount.h:285 [inline] percpu_ref_put include/linux/percpu-refcount.h:301 [inline] percpu_ref_call_confirm_rcu lib/percpu-refcount.c:123 [inline] percpu_ref_switch_to_atomic_rcu+0x50c/0x6b0 lib/percpu-refcount.c:158 __rcu_reclaim kernel/rcu/rcu.h:240 [inline] rcu_do_batch kernel/rcu/tree.c:2452 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2773 [inline] rcu_process_callbacks+0xc4a/0x1680 kernel/rcu/tree.c:2754 __do_softirq+0x30b/0xb11 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x180/0x1d0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x1b7/0x760 arch/x86/kernel/apic/apic.c:1062 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:807 arch_local_irq_restore arch/x86/include/asm/paravirt.h:766 [inline] free_unref_page_list+0xb81/0x10e0 mm/page_alloc.c:2911 release_pages+0x995/0x2840 mm/swap.c:791 __pagevec_release+0x88/0x120 mm/swap.c:811 pagevec_release include/linux/pagevec.h:88 [inline] truncate_inode_pages_range+0xdc6/0x2ad0 mm/truncate.c:369 truncate_inode_pages mm/truncate.c:475 [inline] truncate_inode_pages_final+0x8e/0xd0 mm/truncate.c:526 fat_evict_inode+0x26/0x270 fs/fat/inode.c:646 evict+0x49b/0x940 fs/inode.c:558 dispose_list+0x243/0x400 fs/inode.c:593 evict_inodes+0x49d/0x600 fs/inode.c:643 generic_shutdown_super+0x119/0x530 fs/super.c:449 kill_block_super+0xa0/0x100 fs/super.c:1186 deactivate_locked_super+0x9a/0x100 fs/super.c:330 deactivate_super fs/super.c:361 [inline] deactivate_super+0x2b1/0x320 fs/super.c:357 cleanup_mnt+0xbf/0x160 fs/namespace.c:1096 __cleanup_mnt+0x16/0x20 fs/namespace.c:1103 task_work_run+0x1f4/0x2b0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x32a/0x3b0 arch/x86/entry/common.c:166 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x696/0x800 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe INITIAL USE at: lock_acquire+0x1db/0x570 kernel/locking/lockdep.c:3841 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:128 [inline] _raw_spin_lock_irq+0x60/0x80 kernel/locking/spinlock.c:160 spin_lock_irq include/linux/spinlock.h:354 [inline] free_ioctx_users+0xa7/0x6e0 fs/aio.c:610 percpu_ref_put_many include/linux/percpu-refcount.h:285 [inline] percpu_ref_put include/linux/percpu-refcount.h:301 [inline] percpu_ref_call_confirm_rcu lib/percpu-refcount.c:123 [inline] percpu_ref_switch_to_atomic_rcu+0x50c/0x6b0 lib/percpu-refcount.c:158 __rcu_reclaim kernel/rcu/rcu.h:240 [inline] rcu_do_batch kernel/rcu/tree.c:2452 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2773 [inline] rcu_process_callbacks+0xc4a/0x1680 kernel/rcu/tree.c:2754 __do_softirq+0x30b/0xb11 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x180/0x1d0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x1b7/0x760 arch/x86/kernel/apic/apic.c:1062 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:807 arch_local_irq_restore arch/x86/include/asm/paravirt.h:766 [inline] free_unref_page_list+0xb81/0x10e0 mm/page_alloc.c:2911 release_pages+0x995/0x2840 mm/swap.c:791 __pagevec_release+0x88/0x120 mm/swap.c:811 pagevec_release include/linux/pagevec.h:88 [inline] truncate_inode_pages_range+0xdc6/0x2ad0 mm/truncate.c:369 truncate_inode_pages mm/truncate.c:475 [inline] truncate_inode_pages_final+0x8e/0xd0 mm/truncate.c:526 fat_evict_inode+0x26/0x270 fs/fat/inode.c:646 evict+0x49b/0x940 fs/inode.c:558 dispose_list+0x243/0x400 fs/inode.c:593 evict_inodes+0x49d/0x600 fs/inode.c:643 generic_shutdown_super+0x119/0x530 fs/super.c:449 kill_block_super+0xa0/0x100 fs/super.c:1186 deactivate_locked_super+0x9a/0x100 fs/super.c:330 deactivate_super fs/super.c:361 [inline] deactivate_super+0x2b1/0x320 fs/super.c:357 cleanup_mnt+0xbf/0x160 fs/namespace.c:1096 __cleanup_mnt+0x16/0x20 fs/namespace.c:1103 task_work_run+0x1f4/0x2b0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x32a/0x3b0 arch/x86/entry/common.c:166 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x696/0x800 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe } ... key at: [] __key.51971+0x0/0x40 ... acquired at: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] aio_poll+0x7b9/0x14e0 fs/aio.c:1772 __io_submit_one fs/aio.c:1875 [inline] io_submit_one+0xc39/0x1050 fs/aio.c:1908 __do_sys_io_submit fs/aio.c:1953 [inline] __se_sys_io_submit fs/aio.c:1923 [inline] __x64_sys_io_submit+0x1c4/0x5d0 fs/aio.c:1923 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> (&ctx->fd_wqh){....} { INITIAL USE at: lock_acquire+0x1db/0x570 kernel/locking/lockdep.c:3841 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x95/0xcd kernel/locking/spinlock.c:152 __wake_up_common_lock+0x19b/0x390 kernel/sched/wait.c:120 __wake_up+0xe/0x10 kernel/sched/wait.c:145 handle_userfault+0xdfb/0x2510 fs/userfaultfd.c:487 __do_huge_pmd_anonymous_page mm/huge_memory.c:603 [inline] do_huge_pmd_anonymous_page+0xb4e/0x17f0 mm/huge_memory.c:744 create_huge_pmd mm/memory.c:3678 [inline] __handle_mm_fault+0x385a/0x55a0 mm/memory.c:3882 handle_mm_fault+0x4ec/0xc80 mm/memory.c:3948 do_user_addr_fault arch/x86/mm/fault.c:1475 [inline] __do_page_fault+0x5da/0xd60 arch/x86/mm/fault.c:1541 do_page_fault+0xe6/0x7d8 arch/x86/mm/fault.c:1572 page_fault+0x1e/0x30 arch/x86/entry/entry_64.S:1143 copy_user_generic_unrolled+0x89/0xc0 arch/x86/lib/copy_user_64.S:66 copy_to_user include/linux/uaccess.h:152 [inline] perf_read_one kernel/events/core.c:4802 [inline] __perf_read kernel/events/core.c:4845 [inline] perf_read+0x6dd/0xa40 kernel/events/core.c:4858 __vfs_read+0x116/0xb20 fs/read_write.c:416 vfs_read+0x194/0x3e0 fs/read_write.c:452 ksys_read+0x105/0x260 fs/read_write.c:578 __do_sys_read fs/read_write.c:588 [inline] __se_sys_read fs/read_write.c:586 [inline] __x64_sys_read+0x73/0xb0 fs/read_write.c:586 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe } ... key at: [] __key.44853+0x0/0x40 ... acquired at: lock_acquire+0x1db/0x570 kernel/locking/lockdep.c:3841 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] userfaultfd_ctx_read+0x690/0x2060 fs/userfaultfd.c:1040 userfaultfd_read+0x1e0/0x2c0 fs/userfaultfd.c:1198 __vfs_read+0x116/0xb20 fs/read_write.c:416 vfs_read+0x194/0x3e0 fs/read_write.c:452 ksys_read+0x105/0x260 fs/read_write.c:578 __do_sys_read fs/read_write.c:588 [inline] __se_sys_read fs/read_write.c:586 [inline] __x64_sys_read+0x73/0xb0 fs/read_write.c:586 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe the dependencies between the lock to be acquired and SOFTIRQ-irq-unsafe lock: -> (&ctx->fault_pending_wqh){+.+.} { HARDIRQ-ON-W at: lock_acquire+0x1db/0x570 kernel/locking/lockdep.c:3841 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] handle_userfault+0x901/0x2510 fs/userfaultfd.c:461 __do_huge_pmd_anonymous_page mm/huge_memory.c:603 [inline] do_huge_pmd_anonymous_page+0xb4e/0x17f0 mm/huge_memory.c:744 create_huge_pmd mm/memory.c:3678 [inline] __handle_mm_fault+0x385a/0x55a0 mm/memory.c:3882 handle_mm_fault+0x4ec/0xc80 mm/memory.c:3948 do_user_addr_fault arch/x86/mm/fault.c:1475 [inline] __do_page_fault+0x5da/0xd60 arch/x86/mm/fault.c:1541 do_page_fault+0xe6/0x7d8 arch/x86/mm/fault.c:1572 page_fault+0x1e/0x30 arch/x86/entry/entry_64.S:1143 copy_user_generic_unrolled+0x89/0xc0 arch/x86/lib/copy_user_64.S:66 copy_to_user include/linux/uaccess.h:152 [inline] perf_read_one kernel/events/core.c:4802 [inline] __perf_read kernel/events/core.c:4845 [inline] perf_read+0x6dd/0xa40 kernel/events/core.c:4858 __vfs_read+0x116/0xb20 fs/read_write.c:416 vfs_read+0x194/0x3e0 fs/read_write.c:452 ksys_read+0x105/0x260 fs/read_write.c:578 __do_sys_read fs/read_write.c:588 [inline] __se_sys_read fs/read_write.c:586 [inline] __x64_sys_read+0x73/0xb0 fs/read_write.c:586 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe SOFTIRQ-ON-W at: lock_acquire+0x1db/0x570 kernel/locking/lockdep.c:3841 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] handle_userfault+0x901/0x2510 fs/userfaultfd.c:461 __do_huge_pmd_anonymous_page mm/huge_memory.c:603 [inline] do_huge_pmd_anonymous_page+0xb4e/0x17f0 mm/huge_memory.c:744 create_huge_pmd mm/memory.c:3678 [inline] __handle_mm_fault+0x385a/0x55a0 mm/memory.c:3882 handle_mm_fault+0x4ec/0xc80 mm/memory.c:3948 do_user_addr_fault arch/x86/mm/fault.c:1475 [inline] __do_page_fault+0x5da/0xd60 arch/x86/mm/fault.c:1541 do_page_fault+0xe6/0x7d8 arch/x86/mm/fault.c:1572 page_fault+0x1e/0x30 arch/x86/entry/entry_64.S:1143 copy_user_generic_unrolled+0x89/0xc0 arch/x86/lib/copy_user_64.S:66 copy_to_user include/linux/uaccess.h:152 [inline] perf_read_one kernel/events/core.c:4802 [inline] __perf_read kernel/events/core.c:4845 [inline] perf_read+0x6dd/0xa40 kernel/events/core.c:4858 __vfs_read+0x116/0xb20 fs/read_write.c:416 vfs_read+0x194/0x3e0 fs/read_write.c:452 ksys_read+0x105/0x260 fs/read_write.c:578 __do_sys_read fs/read_write.c:588 [inline] __se_sys_read fs/read_write.c:586 [inline] __x64_sys_read+0x73/0xb0 fs/read_write.c:586 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe INITIAL USE at: lock_acquire+0x1db/0x570 kernel/locking/lockdep.c:3841 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] handle_userfault+0x901/0x2510 fs/userfaultfd.c:461 __do_huge_pmd_anonymous_page mm/huge_memory.c:603 [inline] do_huge_pmd_anonymous_page+0xb4e/0x17f0 mm/huge_memory.c:744 create_huge_pmd mm/memory.c:3678 [inline] __handle_mm_fault+0x385a/0x55a0 mm/memory.c:3882 handle_mm_fault+0x4ec/0xc80 mm/memory.c:3948 do_user_addr_fault arch/x86/mm/fault.c:1475 [inline] __do_page_fault+0x5da/0xd60 arch/x86/mm/fault.c:1541 do_page_fault+0xe6/0x7d8 arch/x86/mm/fault.c:1572 page_fault+0x1e/0x30 arch/x86/entry/entry_64.S:1143 copy_user_generic_unrolled+0x89/0xc0 arch/x86/lib/copy_user_64.S:66 copy_to_user include/linux/uaccess.h:152 [inline] perf_read_one kernel/events/core.c:4802 [inline] __perf_read kernel/events/core.c:4845 [inline] perf_read+0x6dd/0xa40 kernel/events/core.c:4858 __vfs_read+0x116/0xb20 fs/read_write.c:416 vfs_read+0x194/0x3e0 fs/read_write.c:452 ksys_read+0x105/0x260 fs/read_write.c:578 __do_sys_read fs/read_write.c:588 [inline] __se_sys_read fs/read_write.c:586 [inline] __x64_sys_read+0x73/0xb0 fs/read_write.c:586 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe } ... key at: [] __key.44850+0x0/0x40 ... acquired at: lock_acquire+0x1db/0x570 kernel/locking/lockdep.c:3841 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] userfaultfd_ctx_read+0x690/0x2060 fs/userfaultfd.c:1040 userfaultfd_read+0x1e0/0x2c0 fs/userfaultfd.c:1198 __vfs_read+0x116/0xb20 fs/read_write.c:416 vfs_read+0x194/0x3e0 fs/read_write.c:452 ksys_read+0x105/0x260 fs/read_write.c:578 __do_sys_read fs/read_write.c:588 [inline] __se_sys_read fs/read_write.c:586 [inline] __x64_sys_read+0x73/0xb0 fs/read_write.c:586 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe stack backtrace: CPU: 0 PID: 19892 Comm: syz-executor1 Not tainted 5.0.0-rc4 #49 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1db/0x2d0 lib/dump_stack.c:113 print_bad_irq_dependency kernel/locking/lockdep.c:1573 [inline] check_usage.cold+0x5e2/0x917 kernel/locking/lockdep.c:1605 check_irq_usage kernel/locking/lockdep.c:1661 [inline] check_prev_add_irq kernel/locking/lockdep_states.h:8 [inline] check_prev_add kernel/locking/lockdep.c:1871 [inline] check_prevs_add kernel/locking/lockdep.c:1979 [inline] validate_chain kernel/locking/lockdep.c:2350 [inline] __lock_acquire+0x2169/0x4a30 kernel/locking/lockdep.c:3338 lock_acquire+0x1db/0x570 kernel/locking/lockdep.c:3841 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] userfaultfd_ctx_read+0x690/0x2060 fs/userfaultfd.c:1040 userfaultfd_read+0x1e0/0x2c0 fs/userfaultfd.c:1198 __vfs_read+0x116/0xb20 fs/read_write.c:416 vfs_read+0x194/0x3e0 fs/read_write.c:452 ksys_read+0x105/0x260 fs/read_write.c:578 __do_sys_read fs/read_write.c:588 [inline] __se_sys_read fs/read_write.c:586 [inline] __x64_sys_read+0x73/0xb0 fs/read_write.c:586 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x458099 Code: 6d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 3b b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f050afc8c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000458099 RDX: 0000000000000064 RSI: 0000000020009f9c RDI: 0000000000000004 RBP: 000000000073c040 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f050afc96d4 R13: 00000000004c3b97 R14: 00000000004d8520 R15: 00000000ffffffff kobject: 'loop0' (0000000047229e56): kobject_uevent_env kobject: 'loop0' (0000000047229e56): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop2' (00000000671b08e0): kobject_uevent_env kobject: 'loop2' (00000000671b08e0): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop5' (000000008bc08410): kobject_uevent_env kobject: 'loop5' (000000008bc08410): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop1' (00000000c4f7fe97): kobject_uevent_env kobject: 'loop1' (00000000c4f7fe97): fill_kobj_path: path = '/devices/virtual/block/loop1' kobject: 'loop3' (00000000d31f324e): kobject_uevent_env kobject: 'loop3' (00000000d31f324e): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop0' (0000000047229e56): kobject_uevent_env kobject: 'loop0' (0000000047229e56): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop4' (00000000aee4104b): kobject_uevent_env kobject: 'loop4' (00000000aee4104b): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop2' (00000000671b08e0): kobject_uevent_env kobject: 'loop2' (00000000671b08e0): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop0' (0000000047229e56): kobject_uevent_env kobject: 'loop0' (0000000047229e56): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop2' (00000000671b08e0): kobject_uevent_env kobject: 'loop2' (00000000671b08e0): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop0' (0000000047229e56): kobject_uevent_env kobject: 'loop0' (0000000047229e56): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop0' (0000000047229e56): kobject_uevent_env kobject: 'loop0' (0000000047229e56): fill_kobj_path: path = '/devices/virtual/block/loop0' audit: type=1804 audit(1548670120.431:108): pid=19944 uid=0 auid=4294967295 ses=4294967295 subj=_ op=invalid_pcr cause=open_writers comm="syz-executor0" name="/root/syzkaller-testdir135455378/syzkaller.1UBpeT/452/bus" dev="sda1" ino=16765 res=1 kobject: 'loop2' (00000000671b08e0): kobject_uevent_env kobject: 'loop2' (00000000671b08e0): fill_kobj_path: path = '/devices/virtual/block/loop2' audit: type=1800 audit(1548670120.471:109): pid=19944 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="syz-executor0" name="bus" dev="sda1" ino=16765 res=0 kobject: 'loop1' (00000000c4f7fe97): kobject_uevent_env kobject: 'loop1' (00000000c4f7fe97): fill_kobj_path: path = '/devices/virtual/block/loop1' audit: type=1804 audit(1548670121.221:110): pid=19946 uid=0 auid=4294967295 ses=4294967295 subj=_ op=invalid_pcr cause=ToMToU comm="syz-executor0" name="/root/syzkaller-testdir135455378/syzkaller.1UBpeT/452/bus" dev="sda1" ino=16765 res=1 kobject: 'loop5' (000000008bc08410): kobject_uevent_env audit: type=1804 audit(1548670121.251:111): pid=19946 uid=0 auid=4294967295 ses=4294967295 subj=_ op=invalid_pcr cause=open_writers comm="syz-executor0" name="/root/syzkaller-testdir135455378/syzkaller.1UBpeT/452/bus" dev="sda1" ino=16765 res=1 kobject: 'loop5' (000000008bc08410): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop4' (00000000aee4104b): kobject_uevent_env kobject: 'loop4' (00000000aee4104b): fill_kobj_path: path = '/devices/virtual/block/loop4' audit: type=1800 audit(1548670121.251:112): pid=19946 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="syz-executor0" name="bus" dev="sda1" ino=16765 res=0 kobject: 'loop0' (0000000047229e56): kobject_uevent_env kobject: 'loop0' (0000000047229e56): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop3' (00000000d31f324e): kobject_uevent_env audit: type=1804 audit(1548670121.511:113): pid=19961 uid=0 auid=4294967295 ses=4294967295 subj=_ op=invalid_pcr cause=open_writers comm="syz-executor0" name="/root/syzkaller-testdir135455378/syzkaller.1UBpeT/453/bus" dev="sda1" ino=16757 res=1 kobject: 'kvm' (00000000e0cc9ec7): kobject_uevent_env kobject: 'loop3' (00000000d31f324e): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop4' (00000000aee4104b): kobject_uevent_env audit: type=1800 audit(1548670121.511:114): pid=19961 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="syz-executor0" name="bus" dev="sda1" ino=16757 res=0 kobject: 'loop4' (00000000aee4104b): fill_kobj_path: path = '/devices/virtual/block/loop4' audit: type=1804 audit(1548670121.701:115): pid=19976 uid=0 auid=4294967295 ses=4294967295 subj=_ op=invalid_pcr cause=open_writers comm="syz-executor4" name="/root/syzkaller-testdir354399822/syzkaller.yecXw4/475/bus" dev="sda1" ino=16778 res=1 kobject: 'kvm' (00000000e0cc9ec7): fill_kobj_path: path = '/devices/virtual/misc/kvm' audit: type=1800 audit(1548670121.701:116): pid=19976 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="syz-executor4" name="bus" dev="sda1" ino=16778 res=0 kobject: 'kvm' (00000000e0cc9ec7): kobject_uevent_env kobject: 'kvm' (00000000e0cc9ec7): fill_kobj_path: path = '/devices/virtual/misc/kvm' kobject: 'kvm' (00000000e0cc9ec7): kobject_uevent_env kobject: 'kvm' (00000000e0cc9ec7): fill_kobj_path: path = '/devices/virtual/misc/kvm' kobject: 'loop5' (000000008bc08410): kobject_uevent_env kobject: 'loop5' (000000008bc08410): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop1' (00000000c4f7fe97): kobject_uevent_env kobject: 'loop1' (00000000c4f7fe97): fill_kobj_path: path = '/devices/virtual/block/loop1' kobject: 'kvm' (00000000e0cc9ec7): kobject_uevent_env kobject: 'kvm' (00000000e0cc9ec7): fill_kobj_path: path = '/devices/virtual/misc/kvm' kobject: 'loop5' (000000008bc08410): kobject_uevent_env kobject: 'loop5' (000000008bc08410): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop2' (00000000671b08e0): kobject_uevent_env audit: type=1804 audit(1548670122.341:117): pid=19995 uid=0 auid=4294967295 ses=4294967295 subj=_ op=invalid_pcr cause=open_writers comm="syz-executor2" name="/root/syzkaller-testdir072942600/syzkaller.e3jxAs/447/bus" dev="sda1" ino=16779 res=1 kobject: 'loop2' (00000000671b08e0): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop0' (0000000047229e56): kobject_uevent_env kobject: 'loop0' (0000000047229e56): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop5' (000000008bc08410): kobject_uevent_env kobject: 'loop5' (000000008bc08410): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop4' (00000000aee4104b): kobject_uevent_env kobject: 'loop4' (00000000aee4104b): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop3' (00000000d31f324e): kobject_uevent_env kobject: 'loop3' (00000000d31f324e): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop1' (00000000c4f7fe97): kobject_uevent_env kobject: 'loop1' (00000000c4f7fe97): fill_kobj_path: path = '/devices/virtual/block/loop1' kobject: 'loop5' (000000008bc08410): kobject_uevent_env kobject: 'loop5' (000000008bc08410): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop2' (00000000671b08e0): kobject_uevent_env kobject: 'loop2' (00000000671b08e0): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop3' (00000000d31f324e): kobject_uevent_env kobject: 'loop3' (00000000d31f324e): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop5' (000000008bc08410): kobject_uevent_env kobject: 'loop5' (000000008bc08410): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop5' (000000008bc08410): kobject_uevent_env kobject: 'loop5' (000000008bc08410): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop1' (00000000c4f7fe97): kobject_uevent_env kobject: 'loop1' (00000000c4f7fe97): fill_kobj_path: path = '/devices/virtual/block/loop1' kobject: 'loop3' (00000000d31f324e): kobject_uevent_env kobject: 'loop3' (00000000d31f324e): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop0' (0000000047229e56): kobject_uevent_env kobject: 'loop0' (0000000047229e56): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop5' (000000008bc08410): kobject_uevent_env kobject: 'loop5' (000000008bc08410): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop2' (00000000671b08e0): kobject_uevent_env kobject: 'loop2' (00000000671b08e0): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop4' (00000000aee4104b): kobject_uevent_env kobject: 'loop4' (00000000aee4104b): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop3' (00000000d31f324e): kobject_uevent_env kobject: 'loop3' (00000000d31f324e): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop5' (000000008bc08410): kobject_uevent_env kobject: 'loop5' (000000008bc08410): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop3' (00000000d31f324e): kobject_uevent_env kobject: 'loop3' (00000000d31f324e): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop0' (0000000047229e56): kobject_uevent_env kobject: 'loop0' (0000000047229e56): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop2' (00000000671b08e0): kobject_uevent_env kobject: 'loop2' (00000000671b08e0): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop4' (00000000aee4104b): kobject_uevent_env kobject: 'loop4' (00000000aee4104b): fill_kobj_path: path = '/devices/virtual/block/loop4'