audit: type=1400 audit(1565657300.456:36): avc: denied { map } for pid=7914 comm="syz-executor269" path="/root/syz-executor269906150" dev="sda1" ino=16483 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 ======================================================== WARNING: possible irq lock inversion dependency detected 4.19.66 #40 Not tainted -------------------------------------------------------- ksoftirqd/1/18 just changed the state of lock: 00000000980cd5ec (&(&ctx->ctx_lock)->rlock){..-.}, at: spin_lock_irq include/linux/spinlock.h:354 [inline] 00000000980cd5ec (&(&ctx->ctx_lock)->rlock){..-.}, at: free_ioctx_users+0x2d/0x490 fs/aio.c:614 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 ksoftirqd/1/18: #0: 000000003d8ac6bd (rcu_callback){....}, at: __rcu_reclaim kernel/rcu/rcu.h:226 [inline] #0: 000000003d8ac6bd (rcu_callback){....}, at: rcu_do_batch kernel/rcu/tree.c:2584 [inline] #0: 000000003d8ac6bd (rcu_callback){....}, at: invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline] #0: 000000003d8ac6bd (rcu_callback){....}, at: __rcu_process_callbacks kernel/rcu/tree.c:2864 [inline] #0: 000000003d8ac6bd (rcu_callback){....}, at: rcu_process_callbacks+0xc79/0x1a30 kernel/rcu/tree.c:2881 #1: 000000004a0f68c5 (rcu_read_lock_sched){....}, at: percpu_ref_call_confirm_rcu lib/percpu-refcount.c:119 [inline] #1: 000000004a0f68c5 (rcu_read_lock_sched){....}, at: percpu_ref_switch_to_atomic_rcu+0x1ca/0x540 lib/percpu-refcount.c:158 the shortest dependencies between 2nd lock and 1st lock: -> (&fiq->waitq){+.+.} ops: 7 { HARDIRQ-ON-W at: lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:3900 __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] flush_bg_queue+0x1f3/0x3d0 fs/fuse/dev.c:368 fuse_request_send_background_locked+0x26d/0x4e0 fs/fuse/dev.c:609 fuse_request_send_background+0x12b/0x180 fs/fuse/dev.c:617 fuse_send_init fs/fuse/inode.c:973 [inline] fuse_fill_super+0x13b7/0x1720 fs/fuse/inode.c:1188 mount_nodev+0x66/0x110 fs/super.c:1204 fuse_mount+0x2d/0x40 fs/fuse/inode.c:1213 mount_fs+0xa8/0x31f fs/super.c:1261 vfs_kern_mount.part.0+0x6f/0x410 fs/namespace.c:961 vfs_kern_mount fs/namespace.c:951 [inline] do_new_mount fs/namespace.c:2469 [inline] do_mount+0x53e/0x2bc0 fs/namespace.c:2799 ksys_mount+0xdb/0x150 fs/namespace.c:3015 __do_sys_mount fs/namespace.c:3029 [inline] __se_sys_mount fs/namespace.c:3026 [inline] __x64_sys_mount+0xbe/0x150 fs/namespace.c:3026 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe SOFTIRQ-ON-W at: lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:3900 __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] flush_bg_queue+0x1f3/0x3d0 fs/fuse/dev.c:368 fuse_request_send_background_locked+0x26d/0x4e0 fs/fuse/dev.c:609 fuse_request_send_background+0x12b/0x180 fs/fuse/dev.c:617 fuse_send_init fs/fuse/inode.c:973 [inline] fuse_fill_super+0x13b7/0x1720 fs/fuse/inode.c:1188 mount_nodev+0x66/0x110 fs/super.c:1204 fuse_mount+0x2d/0x40 fs/fuse/inode.c:1213 mount_fs+0xa8/0x31f fs/super.c:1261 vfs_kern_mount.part.0+0x6f/0x410 fs/namespace.c:961 vfs_kern_mount fs/namespace.c:951 [inline] do_new_mount fs/namespace.c:2469 [inline] do_mount+0x53e/0x2bc0 fs/namespace.c:2799 ksys_mount+0xdb/0x150 fs/namespace.c:3015 __do_sys_mount fs/namespace.c:3029 [inline] __se_sys_mount fs/namespace.c:3026 [inline] __x64_sys_mount+0xbe/0x150 fs/namespace.c:3026 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe INITIAL USE at: lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:3900 __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] flush_bg_queue+0x1f3/0x3d0 fs/fuse/dev.c:368 fuse_request_send_background_locked+0x26d/0x4e0 fs/fuse/dev.c:609 fuse_request_send_background+0x12b/0x180 fs/fuse/dev.c:617 fuse_send_init fs/fuse/inode.c:973 [inline] fuse_fill_super+0x13b7/0x1720 fs/fuse/inode.c:1188 mount_nodev+0x66/0x110 fs/super.c:1204 fuse_mount+0x2d/0x40 fs/fuse/inode.c:1213 mount_fs+0xa8/0x31f fs/super.c:1261 vfs_kern_mount.part.0+0x6f/0x410 fs/namespace.c:961 vfs_kern_mount fs/namespace.c:951 [inline] do_new_mount fs/namespace.c:2469 [inline] do_mount+0x53e/0x2bc0 fs/namespace.c:2799 ksys_mount+0xdb/0x150 fs/namespace.c:3015 __do_sys_mount fs/namespace.c:3029 [inline] __se_sys_mount fs/namespace.c:3026 [inline] __x64_sys_mount+0xbe/0x150 fs/namespace.c:3026 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe } ... key at: [] __key.42212+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 fs/aio.c:1741 [inline] __io_submit_one fs/aio.c:1849 [inline] io_submit_one+0xef2/0x2eb0 fs/aio.c:1885 __do_sys_io_submit fs/aio.c:1929 [inline] __se_sys_io_submit fs/aio.c:1900 [inline] __x64_sys_io_submit+0x1aa/0x520 fs/aio.c:1900 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> (&(&ctx->ctx_lock)->rlock){..-.} ops: 2 { IN-SOFTIRQ-W at: lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:3900 __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+0x2d/0x490 fs/aio.c:614 percpu_ref_put_many include/linux/percpu-refcount.h:284 [inline] percpu_ref_put include/linux/percpu-refcount.h:300 [inline] percpu_ref_call_confirm_rcu lib/percpu-refcount.c:123 [inline] percpu_ref_switch_to_atomic_rcu+0x407/0x540 lib/percpu-refcount.c:158 __rcu_reclaim kernel/rcu/rcu.h:236 [inline] rcu_do_batch kernel/rcu/tree.c:2584 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2864 [inline] rcu_process_callbacks+0xba0/0x1a30 kernel/rcu/tree.c:2881 __do_softirq+0x25c/0x921 kernel/softirq.c:292 run_ksoftirqd kernel/softirq.c:653 [inline] run_ksoftirqd+0x8e/0x110 kernel/softirq.c:645 smpboot_thread_fn+0x6a3/0xa30 kernel/smpboot.c:164 kthread+0x354/0x420 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 INITIAL USE at: lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:3900 __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] aio_poll fs/aio.c:1739 [inline] __io_submit_one fs/aio.c:1849 [inline] io_submit_one+0xead/0x2eb0 fs/aio.c:1885 __do_sys_io_submit fs/aio.c:1929 [inline] __se_sys_io_submit fs/aio.c:1900 [inline] __x64_sys_io_submit+0x1aa/0x520 fs/aio.c:1900 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe } ... key at: [] __key.50212+0x0/0x40 ... acquired at: mark_lock_irq kernel/locking/lockdep.c:2755 [inline] mark_lock+0x420/0x1370 kernel/locking/lockdep.c:3127 mark_irqflags kernel/locking/lockdep.c:3005 [inline] __lock_acquire+0xc62/0x49c0 kernel/locking/lockdep.c:3368 lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:3900 __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+0x2d/0x490 fs/aio.c:614 percpu_ref_put_many include/linux/percpu-refcount.h:284 [inline] percpu_ref_put include/linux/percpu-refcount.h:300 [inline] percpu_ref_call_confirm_rcu lib/percpu-refcount.c:123 [inline] percpu_ref_switch_to_atomic_rcu+0x407/0x540 lib/percpu-refcount.c:158 __rcu_reclaim kernel/rcu/rcu.h:236 [inline] rcu_do_batch kernel/rcu/tree.c:2584 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2864 [inline] rcu_process_callbacks+0xba0/0x1a30 kernel/rcu/tree.c:2881 __do_softirq+0x25c/0x921 kernel/softirq.c:292 run_ksoftirqd kernel/softirq.c:653 [inline] run_ksoftirqd+0x8e/0x110 kernel/softirq.c:645 smpboot_thread_fn+0x6a3/0xa30 kernel/smpboot.c:164 kthread+0x354/0x420 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 stack backtrace: CPU: 1 PID: 18 Comm: ksoftirqd/1 Not tainted 4.19.66 #40 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+0x2c0/0x2cd kernel/locking/lockdep.c:2621 print_irq_inversion_bug kernel/locking/lockdep.c:2624 [inline] check_usage_forwards.cold+0x20/0x29 kernel/locking/lockdep.c:2646 mark_lock_irq kernel/locking/lockdep.c:2755 [inline] mark_lock+0x420/0x1370 kernel/locking/lockdep.c:3127 mark_irqflags kernel/locking/lockdep.c:3005 [inline] __lock_acquire+0xc62/0x49c0 kernel/locking/lockdep.c:3368 lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:3900 __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+0x2d/0x490 fs/aio.c:614 percpu_ref_put_many include/linux/percpu-refcount.h:284 [inline] percpu_ref_put include/linux/percpu-refcount.h:300 [inline] percpu_ref_call_confirm_rcu lib/percpu-refcount.c:123 [inline] percpu_ref_switch_to_atomic_rcu+0x407/0x540 lib/percpu-refcount.c:158 __rcu_reclaim kernel/rcu/rcu.h:236 [inline] rcu_do_batch kernel/rcu/tree.c:2584 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2864 [inline] rcu_process_callbacks+0xba0/0x1a30 kernel/rcu/tree.c:2881 __do_softirq+0x25c/0x921 kernel/softirq.c:292 run