audit: type=1400 audit(1565810120.611:35): avc: denied { map } for pid=8007 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(1565810127.281:36): avc: denied { map } for pid=8019 comm="syz-executor282" path="/root/syz-executor282960522" dev="sda1" ino=16484 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/0/9 just changed the state of lock: 00000000e98a62ef (&(&ctx->ctx_lock)->rlock){..-.}, at: spin_lock_irq include/linux/spinlock.h:354 [inline] 00000000e98a62ef (&(&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/0/9: #0: 00000000ba34729b (rcu_callback){....}, at: __rcu_reclaim kernel/rcu/rcu.h:226 [inline] #0: 00000000ba34729b (rcu_callback){....}, at: rcu_do_batch kernel/rcu/tree.c:2584 [inline] #0: 00000000ba34729b (rcu_callback){....}, at: invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline] #0: 00000000ba34729b (rcu_callback){....}, at: __rcu_process_callbacks kernel/rcu/tree.c:2864 [inline] #0: 00000000ba34729b (rcu_callback){....}, at: rcu_process_callbacks+0xc79/0x1a30 kernel/rcu/tree.c:2881 #1: 00000000013c16da (rcu_read_lock_sched){....}, at: percpu_ref_call_confirm_rcu lib/percpu-refcount.c:119 [inline] #1: 00000000013c16da (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 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: 0 PID: 9 Comm: ksoftirqd/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