======================================================== WARNING: possible irq lock inversion dependency detected 5.3.0+ #0 Not tainted -------------------------------------------------------- syz-executor.5/8959 just changed the state of lock: ffff888099217b58 (&(&ctx->ctx_lock)->rlock){..-.}, at: spin_lock_irq include/linux/spinlock.h:363 [inline] ffff888099217b58 (&(&ctx->ctx_lock)->rlock){..-.}, at: free_ioctx_users+0x2d/0x490 fs/aio.c:618 but this lock took another, SOFTIRQ-unsafe lock in the past: (&fiq->waitq){+.+.} and interrupts could create inverse lock ordering between them. other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&fiq->waitq); local_irq_disable(); lock(&(&ctx->ctx_lock)->rlock); lock(&fiq->waitq); lock(&(&ctx->ctx_lock)->rlock); *** DEADLOCK *** 2 locks held by syz-executor.5/8959: #0: ffffffff88fab240 (rcu_callback){....}, at: __rcu_reclaim kernel/rcu/rcu.h:210 [inline] #0: ffffffff88fab240 (rcu_callback){....}, at: rcu_do_batch kernel/rcu/tree.c:2157 [inline] #0: ffffffff88fab240 (rcu_callback){....}, at: rcu_core+0x60e/0x1560 kernel/rcu/tree.c:2377 #1: ffffffff88fab280 (rcu_read_lock_sched){....}, at: percpu_ref_call_confirm_rcu lib/percpu-refcount.c:126 [inline] #1: ffffffff88fab280 (rcu_read_lock_sched){....}, at: percpu_ref_switch_to_atomic_rcu+0x20e/0x570 lib/percpu-refcount.c:165 the shortest dependencies between 2nd lock and 1st lock: -> (&fiq->waitq){+.+.} { HARDIRQ-ON-W at: lock_acquire+0x190/0x410 kernel/locking/lockdep.c:4487 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:338 [inline] flush_bg_queue+0x1f3/0x3c0 fs/fuse/dev.c:415 fuse_request_queue_background+0x2f8/0x5a0 fs/fuse/dev.c:676 fuse_request_send_background+0x58/0x110 fs/fuse/dev.c:687 cuse_send_init fs/fuse/cuse.c:459 [inline] cuse_channel_open+0x5ba/0x830 fs/fuse/cuse.c:519 misc_open+0x395/0x4c0 drivers/char/misc.c:141 chrdev_open+0x245/0x6b0 fs/char_dev.c:414 do_dentry_open+0x4df/0x1250 fs/open.c:797 vfs_open+0xa0/0xd0 fs/open.c:914 do_last fs/namei.c:3408 [inline] path_openat+0x10e9/0x4630 fs/namei.c:3525 do_filp_open+0x1a1/0x280 fs/namei.c:3555 do_sys_open+0x3fe/0x5d0 fs/open.c:1097 __do_compat_sys_openat fs/open.c:1143 [inline] __se_compat_sys_openat fs/open.c:1141 [inline] __ia32_compat_sys_openat+0x98/0xf0 fs/open.c:1141 do_syscall_32_irqs_on arch/x86/entry/common.c:333 [inline] do_fast_syscall_32+0x27b/0xdb3 arch/x86/entry/common.c:404 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 SOFTIRQ-ON-W at: lock_acquire+0x190/0x410 kernel/locking/lockdep.c:4487 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:338 [inline] flush_bg_queue+0x1f3/0x3c0 fs/fuse/dev.c:415 fuse_request_queue_background+0x2f8/0x5a0 fs/fuse/dev.c:676 fuse_request_send_background+0x58/0x110 fs/fuse/dev.c:687 cuse_send_init fs/fuse/cuse.c:459 [inline] cuse_channel_open+0x5ba/0x830 fs/fuse/cuse.c:519 misc_open+0x395/0x4c0 drivers/char/misc.c:141 chrdev_open+0x245/0x6b0 fs/char_dev.c:414 do_dentry_open+0x4df/0x1250 fs/open.c:797 vfs_open+0xa0/0xd0 fs/open.c:914 do_last fs/namei.c:3408 [inline] path_openat+0x10e9/0x4630 fs/namei.c:3525 do_filp_open+0x1a1/0x280 fs/namei.c:3555 do_sys_open+0x3fe/0x5d0 fs/open.c:1097 __do_compat_sys_openat fs/open.c:1143 [inline] __se_compat_sys_openat fs/open.c:1141 [inline] __ia32_compat_sys_openat+0x98/0xf0 fs/open.c:1141 do_syscall_32_irqs_on arch/x86/entry/common.c:333 [inline] do_fast_syscall_32+0x27b/0xdb3 arch/x86/entry/common.c:404 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 INITIAL USE at: lock_acquire+0x190/0x410 kernel/locking/lockdep.c:4487 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:338 [inline] flush_bg_queue+0x1f3/0x3c0 fs/fuse/dev.c:415 fuse_request_queue_background+0x2f8/0x5a0 fs/fuse/dev.c:676 fuse_request_send_background+0x58/0x110 fs/fuse/dev.c:687 cuse_send_init fs/fuse/cuse.c:459 [inline] cuse_channel_open+0x5ba/0x830 fs/fuse/cuse.c:519 misc_open+0x395/0x4c0 drivers/char/misc.c:141 chrdev_open+0x245/0x6b0 fs/char_dev.c:414 do_dentry_open+0x4df/0x1250 fs/open.c:797 vfs_open+0xa0/0xd0 fs/open.c:914 do_last fs/namei.c:3408 [inline] path_openat+0x10e9/0x4630 fs/namei.c:3525 do_filp_open+0x1a1/0x280 fs/namei.c:3555 do_sys_open+0x3fe/0x5d0 fs/open.c:1097 __do_compat_sys_openat fs/open.c:1143 [inline] __se_compat_sys_openat fs/open.c:1141 [inline] __ia32_compat_sys_openat+0x98/0xf0 fs/open.c:1141 do_syscall_32_irqs_on arch/x86/entry/common.c:333 [inline] do_fast_syscall_32+0x27b/0xdb3 arch/x86/entry/common.c:404 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 } ... key at: [] __key.44695+0x0/0x40 ... acquired at: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:338 [inline] aio_poll fs/aio.c:1751 [inline] __io_submit_one fs/aio.c:1825 [inline] io_submit_one+0xefa/0x2ef0 fs/aio.c:1862 __do_compat_sys_io_submit fs/aio.c:1963 [inline] __se_compat_sys_io_submit fs/aio.c:1933 [inline] __ia32_compat_sys_io_submit+0x1bf/0x570 fs/aio.c:1933 do_syscall_32_irqs_on arch/x86/entry/common.c:333 [inline] do_fast_syscall_32+0x27b/0xdb3 arch/x86/entry/common.c:404 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 -> (&(&ctx->ctx_lock)->rlock){..-.} { IN-SOFTIRQ-W at: lock_acquire+0x190/0x410 kernel/locking/lockdep.c:4487 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:128 [inline] _raw_spin_lock_irq+0x60/0x80 kernel/locking/spinlock.c:167 spin_lock_irq include/linux/spinlock.h:363 [inline] free_ioctx_users+0x2d/0x490 fs/aio.c:618 percpu_ref_put_many include/linux/percpu-refcount.h:293 [inline] percpu_ref_put include/linux/percpu-refcount.h:309 [inline] percpu_ref_call_confirm_rcu lib/percpu-refcount.c:130 [inline] percpu_ref_switch_to_atomic_rcu+0x4c0/0x570 lib/percpu-refcount.c:165 __rcu_reclaim kernel/rcu/rcu.h:222 [inline] rcu_do_batch kernel/rcu/tree.c:2157 [inline] rcu_core+0x581/0x1560 kernel/rcu/tree.c:2377 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2386 __do_softirq+0x262/0x98c kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x19b/0x1e0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x1a3/0x610 arch/x86/kernel/apic/apic.c:1137 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830 arch_local_irq_restore arch/x86/include/asm/paravirt.h:756 [inline] slab_alloc mm/slab.c:3312 [inline] kmem_cache_alloc+0x283/0x710 mm/slab.c:3483 getname_flags fs/namei.c:138 [inline] getname_flags+0xd6/0x5b0 fs/namei.c:128 getname fs/namei.c:209 [inline] user_path_mountpoint_at+0x29/0x50 fs/namei.c:2737 ksys_umount+0x164/0xf00 fs/namespace.c:1683 __do_sys_umount fs/namespace.c:1709 [inline] __se_sys_umount fs/namespace.c:1707 [inline] __ia32_sys_umount+0x53/0x80 fs/namespace.c:1707 do_syscall_32_irqs_on arch/x86/entry/common.c:333 [inline] do_fast_syscall_32+0x27b/0xdb3 arch/x86/entry/common.c:404 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 INITIAL USE at: lock_acquire+0x190/0x410 kernel/locking/lockdep.c:4487 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:128 [inline] _raw_spin_lock_irq+0x60/0x80 kernel/locking/spinlock.c:167 spin_lock_irq include/linux/spinlock.h:363 [inline] aio_poll fs/aio.c:1749 [inline] __io_submit_one fs/aio.c:1825 [inline] io_submit_one+0xeb5/0x2ef0 fs/aio.c:1862 __do_compat_sys_io_submit fs/aio.c:1963 [inline] __se_compat_sys_io_submit fs/aio.c:1933 [inline] __ia32_compat_sys_io_submit+0x1bf/0x570 fs/aio.c:1933 do_syscall_32_irqs_on arch/x86/entry/common.c:333 [inline] do_fast_syscall_32+0x27b/0xdb3 arch/x86/entry/common.c:404 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 } ... key at: [] __key.54316+0x0/0x40 ... acquired at: mark_lock_irq kernel/locking/lockdep.c:3317 [inline] mark_lock+0x517/0x1220 kernel/locking/lockdep.c:3666 mark_usage kernel/locking/lockdep.c:3566 [inline] __lock_acquire+0x1eaf/0x4e70 kernel/locking/lockdep.c:3909 lock_acquire+0x190/0x410 kernel/locking/lockdep.c:4487 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:128 [inline] _raw_spin_lock_irq+0x60/0x80 kernel/locking/spinlock.c:167 spin_lock_irq include/linux/spinlock.h:363 [inline] free_ioctx_users+0x2d/0x490 fs/aio.c:618 percpu_ref_put_many include/linux/percpu-refcount.h:293 [inline] percpu_ref_put include/linux/percpu-refcount.h:309 [inline] percpu_ref_call_confirm_rcu lib/percpu-refcount.c:130 [inline] percpu_ref_switch_to_atomic_rcu+0x4c0/0x570 lib/percpu-refcount.c:165 __rcu_reclaim kernel/rcu/rcu.h:222 [inline] rcu_do_batch kernel/rcu/tree.c:2157 [inline] rcu_core+0x581/0x1560 kernel/rcu/tree.c:2377 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2386 __do_softirq+0x262/0x98c kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x19b/0x1e0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x1a3/0x610 arch/x86/kernel/apic/apic.c:1137 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830 arch_local_irq_restore arch/x86/include/asm/paravirt.h:756 [inline] slab_alloc mm/slab.c:3312 [inline] kmem_cache_alloc+0x283/0x710 mm/slab.c:3483 getname_flags fs/namei.c:138 [inline] getname_flags+0xd6/0x5b0 fs/namei.c:128 getname fs/namei.c:209 [inline] user_path_mountpoint_at+0x29/0x50 fs/namei.c:2737 ksys_umount+0x164/0xf00 fs/namespace.c:1683 __do_sys_umount fs/namespace.c:1709 [inline] __se_sys_umount fs/namespace.c:1707 [inline] __ia32_sys_umount+0x53/0x80 fs/namespace.c:1707 do_syscall_32_irqs_on arch/x86/entry/common.c:333 [inline] do_fast_syscall_32+0x27b/0xdb3 arch/x86/entry/common.c:404 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 stack backtrace: CPU: 1 PID: 8959 Comm: syz-executor.5 Not tainted 5.3.0+ #0 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+0x172/0x1f0 lib/dump_stack.c:113 print_irq_inversion_bug.part.0+0x2e4/0x2f1 kernel/locking/lockdep.c:3179 print_irq_inversion_bug kernel/locking/lockdep.c:3180 [inline] check_usage_forwards.cold+0x20/0x29 kernel/locking/lockdep.c:3204 mark_lock_irq kernel/locking/lockdep.c:3317 [inline] mark_lock+0x517/0x1220 kernel/locking/lockdep.c:3666 mark_usage kernel/locking/lockdep.c:3566 [inline] __lock_acquire+0x1eaf/0x4e70 kernel/locking/lockdep.c:3909 lock_acquire+0x190/0x410 kernel/locking/lockdep.c:4487 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:128 [inline] _raw_spin_lock_irq+0x60/0x80 kernel/locking/spinlock.c:167 spin_lock_irq include/linux/spinlock.h:363 [inline] free_ioctx_users+0x2d/0x490 fs/aio.c:618 percpu_ref_put_many include/linux/percpu-refcount.h:293 [inline] percpu_ref_put include/linux/percpu-refcount.h:309 [inline] percpu_ref_call_confirm_rcu lib/percpu-refcount.c:130 [inline] percpu_ref_switch_to_atomic_rcu+0x4c0/0x570 lib/percpu-refcount.c:165 __rcu_reclaim kernel/rcu/rcu.h:222 [inline] rcu_do_batch kernel/rcu/tree.c:2157 [inline] rcu_core+0x581/0x1560 kernel/rcu/tree.c:2377 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2386 __do_softirq+0x262/0x98c kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x19b/0x1e0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x1a3/0x610 arch/x86/kernel/apic/apic.c:1137 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:756 [inline] RIP: 0010:slab_alloc mm/slab.c:3312 [inline] RIP: 0010:kmem_cache_alloc+0x283/0x710 mm/slab.c:3483 Code: 7e 0f 85 dc fe ff ff e8 0b d6 52 ff e9 d2 fe ff ff e8 c1 f4 ca ff 48 83 3d d9 86 45 07 00 0f 84 51 03 00 00 48 8b 7d d0 57 9d <0f> 1f 44 00 00 e9 68 fe ff ff 31 d2 be 35 02 00 00 48 c7 c7 d6 01 RSP: 0018:ffff88806a2c7d08 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000007 RBX: 0000000000000cc0 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000006 RDI: 0000000000000282 RBP: ffff88806a2c7d70 R08: ffff88808d6bc600 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880aa57bc40 R13: ffff8880aa57bc40 R14: 0000000000000cc0 R15: ffff88809808c400 getname_flags fs/namei.c:138 [inline] getname_flags+0xd6/0x5b0 fs/namei.c:128 getname fs/namei.c:209 [inline] user_path_mountpoint_at+0x29/0x50 fs/namei.c:2737 ksys_umount+0x164/0xf00 fs/namespace.c:1683 __do_sys_umount fs/namespace.c:1709 [inline] __se_sys_umount fs/namespace.c:1707 [inline] __ia32_sys_umount+0x53/0x80 fs/namespace.c:1707 do_syscall_32_irqs_on arch/x86/entry/common.c:333 [inline] do_fast_syscall_32+0x27b/0xdb3 arch/x86/entry/common.c:404 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7fbba29 Code: b8 80 96 98 00 eb cc 8b 04 24 c3 8b 1c 24 c3 8b 34 24 c3 8b 3c 24 c3 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:000000000847ed1c EFLAGS: 00000212 ORIG_RAX: 0000000000000034 RAX: ffffffffffffffda RBX: 000000000847fe10 RCX: 0000000000000002 RDX: 0000000000000002 RSI: 0000000000013095 RDI: 0000000000000000 RBP: 000000000847edac R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000