audit: type=1400 audit(1565864067.062:35): avc: denied { map } for pid=7627 comm="bash" path="/bin/bash" dev="sda1" ino=1457 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1565864073.512:36): avc: denied { map } for pid=7639 comm="syz-executor148" path="/root/syz-executor148591045" 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 -------------------------------------------------------- swapper/0/0 just changed the state of lock: 00000000c22ee830 (&(&ctx->ctx_lock)->rlock){..-.}, at: spin_lock_irq include/linux/spinlock.h:354 [inline] 00000000c22ee830 (&(&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 swapper/0/0: #0: 000000003f141e1f (rcu_callback){....}, at: __rcu_reclaim kernel/rcu/rcu.h:226 [inline] #0: 000000003f141e1f (rcu_callback){....}, at: rcu_do_batch kernel/rcu/tree.c:2584 [inline] #0: 000000003f141e1f (rcu_callback){....}, at: invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline] #0: 000000003f141e1f (rcu_callback){....}, at: __rcu_process_callbacks kernel/rcu/tree.c:2864 [inline] #0: 000000003f141e1f (rcu_callback){....}, at: rcu_process_callbacks+0xc79/0x1a30 kernel/rcu/tree.c:2881 #1: 00000000f6c79699 (rcu_read_lock_sched){....}, at: percpu_ref_call_confirm_rcu lib/percpu-refcount.c:119 [inline] #1: 00000000f6c79699 (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: 4 { 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 cuse_send_init fs/fuse/cuse.c:458 [inline] cuse_channel_open+0x5ba/0x830 fs/fuse/cuse.c:518 misc_open+0x395/0x4c0 drivers/char/misc.c:141 chrdev_open+0x245/0x6b0 fs/char_dev.c:423 do_dentry_open+0x4c3/0x1210 fs/open.c:796 vfs_open+0xa0/0xd0 fs/open.c:905 do_last fs/namei.c:3418 [inline] path_openat+0x10d7/0x45e0 fs/namei.c:3534 do_filp_open+0x1a1/0x280 fs/namei.c:3564 do_sys_open+0x3fe/0x550 fs/open.c:1088 __do_sys_openat fs/open.c:1115 [inline] __se_sys_openat fs/open.c:1109 [inline] __x64_sys_openat+0x9d/0x100 fs/open.c:1109 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 cuse_send_init fs/fuse/cuse.c:458 [inline] cuse_channel_open+0x5ba/0x830 fs/fuse/cuse.c:518 misc_open+0x395/0x4c0 drivers/char/misc.c:141 chrdev_open+0x245/0x6b0 fs/char_dev.c:423 do_dentry_open+0x4c3/0x1210 fs/open.c:796 vfs_open+0xa0/0xd0 fs/open.c:905 do_last fs/namei.c:3418 [inline] path_openat+0x10d7/0x45e0 fs/namei.c:3534 do_filp_open+0x1a1/0x280 fs/namei.c:3564 do_sys_open+0x3fe/0x550 fs/open.c:1088 __do_sys_openat fs/open.c:1115 [inline] __se_sys_openat fs/open.c:1109 [inline] __x64_sys_openat+0x9d/0x100 fs/open.c:1109 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 cuse_send_init fs/fuse/cuse.c:458 [inline] cuse_channel_open+0x5ba/0x830 fs/fuse/cuse.c:518 misc_open+0x395/0x4c0 drivers/char/misc.c:141 chrdev_open+0x245/0x6b0 fs/char_dev.c:423 do_dentry_open+0x4c3/0x1210 fs/open.c:796 vfs_open+0xa0/0xd0 fs/open.c:905 do_last fs/namei.c:3418 [inline] path_openat+0x10d7/0x45e0 fs/namei.c:3534 do_filp_open+0x1a1/0x280 fs/namei.c:3564 do_sys_open+0x3fe/0x550 fs/open.c:1088 __do_sys_openat fs/open.c:1115 [inline] __se_sys_openat fs/open.c:1109 [inline] __x64_sys_openat+0x9d/0x100 fs/open.c:1109 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 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x180/0x1d0 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x13b/0x550 arch/x86/kernel/apic/apic.c:1056 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:893 native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:60 arch_cpu_idle+0xa/0x10 arch/x86/kernel/process.c:556 default_idle_call+0x36/0x90 kernel/sched/idle.c:93 cpuidle_idle_call kernel/sched/idle.c:153 [inline] do_idle+0x377/0x560 kernel/sched/idle.c:262 cpu_startup_entry+0xc8/0xe0 kernel/sched/idle.c:368 rest_init+0x219/0x222 init/main.c:442 start_kernel+0x88c/0x8c5 init/main.c:738 x86_64_start_reservations+0x29/0x2b arch/x86/kernel/head64.c:472 x86_64_start_kernel+0x77/0x7b arch/x86/kernel/head64.c:453 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 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 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x180/0x1d0 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x13b/0x550 arch/x86/kernel/apic/apic.c:1056 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:893 native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:60 arch_cpu_idle+0xa/0x10 arch/x86/kernel/process.c:556 default_idle_call+0x36/0x90 kernel/sched/idle.c:93 cpuidle_idle_call kernel/sched/idle.c:153 [inline] do_idle+0x377/0x560 kernel/sched/idle.c:262 cpu_startup_entry+0xc8/0xe0 kernel/sched/idle.c:368 rest_init+0x219/0x222 init/main.c:442 start_kernel+0x88c/0x8c5 init/main.c:738 x86_64_start_reservations+0x29/0x2b arch/x86/kernel/head64.c:472 x86_64_start_kernel+0x77/0x7b arch/x86/kernel/head64.c:453 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 stack backtrace: CPU: 0 PID: 0 Comm: swapper/0 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 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x180/0x1d0 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x13b/0x550 arch/x86/kernel/apic/apic.c:1056 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:893 RIP: 0010:native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:61 Code: ff ff 48 89 df e8 12 5a ae fa eb 82 e9 07 00 00 00 0f 00 2d 14 41 54 00 f4 c3 66 90 e9 07 00 00 00 0f 00 2d 04 41 54 00 fb f4 90 55 48 89 e5 41 57 41 56 41 55 41 54 53 e8 0e 3e 66 fa e8 89 RSP: 0018:ffffffff88607ca8 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff10e489c RBX: ffffffff88679ec0 RCX: 0000000000000000 RDX: dffffc0000000000 RSI: 0000000000000001 RDI: ffffffff8867a73c RBP: ffffffff88607cd8 R08: ffffffff88679ec0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: ffffffff887244d0 R14: 0000000000000000 R15: 0000000000000000 arch_cpu_idle+0xa/0x10 arch/x86/kernel/process.c:556 default_idle_call+0x36/0x90 kernel/sched/idle.c:93 cpuidle_idle_call kernel/sched/idle.c:153 [inline] do_idle+0x377/0x560 kernel/sched/idle.c:262 ? check_preemption_disabled+0x48