======================================================== WARNING: possible irq lock inversion dependency detected 6.8.0-syzkaller-08951-gfe46a7dd189e #0 Not tainted -------------------------------------------------------- syz-executor.2/10266 just changed the state of lock: ffff8880290e5110 (&group->lock#2){..-.}-{2:2}, at: class_pcm_stream_lock_irqsave_constructor include/sound/pcm.h:669 [inline] ffff8880290e5110 (&group->lock#2){..-.}-{2:2}, at: snd_pcm_period_elapsed+0x21/0x50 sound/core/pcm_lib.c:1904 but this lock took another, SOFTIRQ-unsafe lock in the past: (&timer->lock){+.+.}-{2:2} 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(&timer->lock); local_irq_disable(); lock(&group->lock#2); lock(&timer->lock); lock(&group->lock#2); *** DEADLOCK *** 3 locks held by syz-executor.2/10266: #0: ffff88805eb1f3a0 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_lock include/linux/mmap_lock.h:146 [inline] #0: ffff88805eb1f3a0 (&mm->mmap_lock){++++}-{3:3}, at: exit_mmap+0x1be/0xd40 mm/mmap.c:3271 #1: ffffffff8e132020 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:298 [inline] #1: ffffffff8e132020 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:750 [inline] #1: ffffffff8e132020 (rcu_read_lock){....}-{1:2}, at: __pte_offset_map+0x82/0x380 mm/pgtable-generic.c:285 #2: ffff88802e21fc18 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #2: ffff88802e21fc18 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: __pte_offset_map_lock+0x1ba/0x300 mm/pgtable-generic.c:373 the shortest dependencies between 2nd lock and 1st lock: -> (&timer->lock){+.+.}-{2:2} { HARDIRQ-ON-W at: lock_acquire+0x1e4/0x530 kernel/locking/lockdep.c:5754 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:351 [inline] class_spinlock_constructor include/linux/spinlock.h:561 [inline] snd_timer_close_locked+0x53/0x8d0 sound/core/timer.c:412 snd_timer_close+0xae/0x130 sound/core/timer.c:464 snd_seq_timer_close+0xa9/0xe0 sound/core/seq/seq_timer.c:302 queue_delete sound/core/seq/seq_queue.c:126 [inline] snd_seq_queue_client_leave+0x7f/0x2b0 sound/core/seq/seq_queue.c:543 seq_free_client1+0xfe/0x2b0 sound/core/seq/seq_clientmgr.c:285 seq_free_client+0x6c/0x180 sound/core/seq/seq_clientmgr.c:306 snd_seq_release+0x48/0xc0 sound/core/seq/seq_clientmgr.c:387 __fput+0x42b/0x8a0 fs/file_table.c:422 task_work_run+0x251/0x310 kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xa1b/0x27e0 kernel/exit.c:878 do_group_exit+0x207/0x2c0 kernel/exit.c:1027 get_signal+0x176e/0x1850 kernel/signal.c:2907 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:105 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:201 [inline] syscall_exit_to_user_mode+0xc9/0x360 kernel/entry/common.c:212 do_syscall_64+0x10a/0x240 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x6d/0x75 SOFTIRQ-ON-W at: lock_acquire+0x1e4/0x530 kernel/locking/lockdep.c:5754 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:351 [inline] class_spinlock_constructor include/linux/spinlock.h:561 [inline] snd_timer_close_locked+0x53/0x8d0 sound/core/timer.c:412 snd_timer_close+0xae/0x130 sound/core/timer.c:464 snd_seq_timer_close+0xa9/0xe0 sound/core/seq/seq_timer.c:302 queue_delete sound/core/seq/seq_queue.c:126 [inline] snd_seq_queue_client_leave+0x7f/0x2b0 sound/core/seq/seq_queue.c:543 seq_free_client1+0xfe/0x2b0 sound/core/seq/seq_clientmgr.c:285 seq_free_client+0x6c/0x180 sound/core/seq/seq_clientmgr.c:306 snd_seq_release+0x48/0xc0 sound/core/seq/seq_clientmgr.c:387 __fput+0x42b/0x8a0 fs/file_table.c:422 task_work_run+0x251/0x310 kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xa1b/0x27e0 kernel/exit.c:878 do_group_exit+0x207/0x2c0 kernel/exit.c:1027 get_signal+0x176e/0x1850 kernel/signal.c:2907 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:105 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:201 [inline] syscall_exit_to_user_mode+0xc9/0x360 kernel/entry/common.c:212 do_syscall_64+0x10a/0x240 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x6d/0x75 INITIAL USE at: lock_acquire+0x1e4/0x530 kernel/locking/lockdep.c:5754 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 class_spinlock_irqsave_constructor include/linux/spinlock.h:574 [inline] snd_timer_notify+0x103/0x3d0 sound/core/timer.c:1040 snd_pcm_action sound/core/pcm_native.c:1370 [inline] snd_pcm_action_lock_irq+0x1b7/0x290 sound/core/pcm_native.c:1383 snd_pcm_oss_set_trigger+0x580/0x730 sound/core/oss/pcm_oss.c:2134 snd_pcm_oss_poll+0x668/0x8c0 sound/core/oss/pcm_oss.c:2863 vfs_poll include/linux/poll.h:84 [inline] ep_item_poll fs/eventpoll.c:995 [inline] ep_insert+0x10c6/0x1900 fs/eventpoll.c:1666 do_epoll_ctl+0x8d2/0xf70 fs/eventpoll.c:2329 __do_sys_epoll_ctl fs/eventpoll.c:2386 [inline] __se_sys_epoll_ctl fs/eventpoll.c:2377 [inline] __x64_sys_epoll_ctl+0x161/0x1a0 fs/eventpoll.c:2377 do_syscall_64+0xfd/0x240 entry_SYSCALL_64_after_hwframe+0x6d/0x75 } ... key at: [] snd_timer_new.__key+0x0/0x20 ... acquired at: lock_acquire+0x1e4/0x530 kernel/locking/lockdep.c:5754 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 class_spinlock_irqsave_constructor include/linux/spinlock.h:574 [inline] snd_timer_notify+0x103/0x3d0 sound/core/timer.c:1040 snd_pcm_action sound/core/pcm_native.c:1370 [inline] snd_pcm_action_lock_irq+0x1b7/0x290 sound/core/pcm_native.c:1383 snd_pcm_oss_set_trigger+0x580/0x730 sound/core/oss/pcm_oss.c:2134 snd_pcm_oss_poll+0x668/0x8c0 sound/core/oss/pcm_oss.c:2863 vfs_poll include/linux/poll.h:84 [inline] ep_item_poll fs/eventpoll.c:995 [inline] ep_insert+0x10c6/0x1900 fs/eventpoll.c:1666 do_epoll_ctl+0x8d2/0xf70 fs/eventpoll.c:2329 __do_sys_epoll_ctl fs/eventpoll.c:2386 [inline] __se_sys_epoll_ctl fs/eventpoll.c:2377 [inline] __x64_sys_epoll_ctl+0x161/0x1a0 fs/eventpoll.c:2377 do_syscall_64+0xfd/0x240 entry_SYSCALL_64_after_hwframe+0x6d/0x75 -> (&group->lock#2){..-.}-{2:2} { IN-SOFTIRQ-W at: lock_acquire+0x1e4/0x530 kernel/locking/lockdep.c:5754 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 class_pcm_stream_lock_irqsave_constructor include/sound/pcm.h:669 [inline] snd_pcm_period_elapsed+0x21/0x50 sound/core/pcm_lib.c:1904 dummy_hrtimer_callback+0x7f/0x180 sound/drivers/dummy.c:385 __run_hrtimer kernel/time/hrtimer.c:1692 [inline] __hrtimer_run_queues+0x597/0xd00 kernel/time/hrtimer.c:1756 hrtimer_run_softirq+0x19a/0x2c0 kernel/time/hrtimer.c:1773 __do_softirq+0x2be/0x943 kernel/softirq.c:554 invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu+0xf2/0x1c0 kernel/softirq.c:633 irq_exit_rcu+0x9/0x30 kernel/softirq.c:645 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 zap_pte_range mm/memory.c:1539 [inline] zap_pmd_range mm/memory.c:1597 [inline] zap_pud_range mm/memory.c:1626 [inline] zap_p4d_range mm/memory.c:1647 [inline] unmap_page_range+0x19d2/0x3610 mm/memory.c:1668 unmap_vmas+0x3cc/0x5f0 mm/memory.c:1758 exit_mmap+0x2c6/0xd40 mm/mmap.c:3287 __mmput+0x115/0x3c0 kernel/fork.c:1345 exit_mm+0x220/0x310 kernel/exit.c:569 do_exit+0x99e/0x27e0 kernel/exit.c:865 do_group_exit+0x207/0x2c0 kernel/exit.c:1027 get_signal+0x176e/0x1850 kernel/signal.c:2907 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:105 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:201 [inline] syscall_exit_to_user_mode+0xc9/0x360 kernel/entry/common.c:212 do_syscall_64+0x10a/0x240 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x6d/0x75 INITIAL USE at: lock_acquire+0x1e4/0x530 kernel/locking/lockdep.c:5754 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:119 [inline] _raw_spin_lock_irq+0xd3/0x120 kernel/locking/spinlock.c:170 class_pcm_stream_lock_irq_constructor include/sound/pcm.h:666 [inline] snd_pcm_oss_poll+0x191/0x8c0 sound/core/oss/pcm_oss.c:2841 vfs_poll include/linux/poll.h:84 [inline] ep_item_poll fs/eventpoll.c:995 [inline] ep_insert+0x10c6/0x1900 fs/eventpoll.c:1666 do_epoll_ctl+0x8d2/0xf70 fs/eventpoll.c:2329 __do_sys_epoll_ctl fs/eventpoll.c:2386 [inline] __se_sys_epoll_ctl fs/eventpoll.c:2377 [inline] __x64_sys_epoll_ctl+0x161/0x1a0 fs/eventpoll.c:2377 do_syscall_64+0xfd/0x240 entry_SYSCALL_64_after_hwframe+0x6d/0x75 } ... key at: [] snd_pcm_group_init.__key+0x0/0x20 ... acquired at: mark_lock+0x223/0x350 kernel/locking/lockdep.c:4678 __lock_acquire+0xbcd/0x1fd0 kernel/locking/lockdep.c:5091 lock_acquire+0x1e4/0x530 kernel/locking/lockdep.c:5754 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 class_pcm_stream_lock_irqsave_constructor include/sound/pcm.h:669 [inline] snd_pcm_period_elapsed+0x21/0x50 sound/core/pcm_lib.c:1904 dummy_hrtimer_callback+0x7f/0x180 sound/drivers/dummy.c:385 __run_hrtimer kernel/time/hrtimer.c:1692 [inline] __hrtimer_run_queues+0x597/0xd00 kernel/time/hrtimer.c:1756 hrtimer_run_softirq+0x19a/0x2c0 kernel/time/hrtimer.c:1773 __do_softirq+0x2be/0x943 kernel/softirq.c:554 invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu+0xf2/0x1c0 kernel/softirq.c:633 irq_exit_rcu+0x9/0x30 kernel/softirq.c:645 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 zap_pte_range mm/memory.c:1539 [inline] zap_pmd_range mm/memory.c:1597 [inline] zap_pud_range mm/memory.c:1626 [inline] zap_p4d_range mm/memory.c:1647 [inline] unmap_page_range+0x19d2/0x3610 mm/memory.c:1668 unmap_vmas+0x3cc/0x5f0 mm/memory.c:1758 exit_mmap+0x2c6/0xd40 mm/mmap.c:3287 __mmput+0x115/0x3c0 kernel/fork.c:1345 exit_mm+0x220/0x310 kernel/exit.c:569 do_exit+0x99e/0x27e0 kernel/exit.c:865 do_group_exit+0x207/0x2c0 kernel/exit.c:1027 get_signal+0x176e/0x1850 kernel/signal.c:2907 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:105 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:201 [inline] syscall_exit_to_user_mode+0xc9/0x360 kernel/entry/common.c:212 do_syscall_64+0x10a/0x240 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x6d/0x75 stack backtrace: CPU: 0 PID: 10266 Comm: syz-executor.2 Not tainted 6.8.0-syzkaller-08951-gfe46a7dd189e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 mark_lock_irq+0x80c/0xc20 kernel/locking/lockdep.c:4243 mark_lock+0x223/0x350 kernel/locking/lockdep.c:4678 __lock_acquire+0xbcd/0x1fd0 kernel/locking/lockdep.c:5091 lock_acquire+0x1e4/0x530 kernel/locking/lockdep.c:5754 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 class_pcm_stream_lock_irqsave_constructor include/sound/pcm.h:669 [inline] snd_pcm_period_elapsed+0x21/0x50 sound/core/pcm_lib.c:1904 dummy_hrtimer_callback+0x7f/0x180 sound/drivers/dummy.c:385 __run_hrtimer kernel/time/hrtimer.c:1692 [inline] __hrtimer_run_queues+0x597/0xd00 kernel/time/hrtimer.c:1756 hrtimer_run_softirq+0x19a/0x2c0 kernel/time/hrtimer.c:1773 __do_softirq+0x2be/0x943 kernel/softirq.c:554 invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu+0xf2/0x1c0 kernel/softirq.c:633 irq_exit_rcu+0x9/0x30 kernel/softirq.c:645 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:zap_pte_range mm/memory.c:1539 [inline] RIP: 0010:zap_pmd_range mm/memory.c:1597 [inline] RIP: 0010:zap_pud_range mm/memory.c:1626 [inline] RIP: 0010:zap_p4d_range mm/memory.c:1647 [inline] RIP: 0010:unmap_page_range+0x19d2/0x3610 mm/memory.c:1668 Code: 84 c0 0f 85 96 13 00 00 e8 4b fb b4 ff 4c 39 b4 24 78 01 00 00 0f 84 d3 0d 00 00 48 83 44 24 70 08 e8 32 fb b4 ff 49 83 c4 08 <49> 81 c6 00 10 00 00 e9 af f0 ff ff e8 1d fb b4 ff 49 bf 00 00 00 RSP: 0018:ffffc9000b5973c0 EFLAGS: 00000296 RAX: ffffffff81dffa1e RBX: ffffc9000b5975a0 RCX: ffff88807dda5a00 RDX: 0000000000000000 RSI: 00000000000001fe RDI: 00000000000000b0 RBP: ffffc9000b597650 R08: ffffffff81e5b3a0 R09: 1ffffd400039cd68 R10: dffffc0000000000 R11: fffff9400039cd69 R12: ffff88807be3d590 R13: ffff88805eb1f200 R14: 00007efc73eb1000 R15: dffffc0000000000 unmap_vmas+0x3cc/0x5f0 mm/memory.c:1758 exit_mmap+0x2c6/0xd40 mm/mmap.c:3287 __mmput+0x115/0x3c0 kernel/fork.c:1345 exit_mm+0x220/0x310 kernel/exit.c:569 do_exit+0x99e/0x27e0 kernel/exit.c:865 do_group_exit+0x207/0x2c0 kernel/exit.c:1027 get_signal+0x176e/0x1850 kernel/signal.c:2907 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:105 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:201 [inline] syscall_exit_to_user_mode+0xc9/0x360 kernel/entry/common.c:212 do_syscall_64+0x10a/0x240 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x6d/0x75 RIP: 0033:0x7efc7527de69 Code: Unable to access opcode bytes at 0x7efc7527de3f. RSP: 002b:00007efc75ff6178 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00007efc753abf88 RCX: 00007efc7527de69 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007efc753abf88 RBP: 00007efc753abf80 R08: 00007efc75ff66c0 R09: 00007efc75ff66c0 R10: 0000000000000000 R11: 0000000000000246 R12: 00007efc753abf8c R13: 000000000000000b R14: 00007ffde32a0fd0 R15: 00007ffde32a10b8 vxcan1: j1939_tp_rxtimer: 0xffff88802a787c00: rx timeout, send abort vxcan1: j1939_tp_rxtimer: 0xffff88802b507000: rx timeout, send abort vxcan1: j1939_xtp_rx_abort_one: 0xffff88802a787c00: 0x00000: (3) A timeout occurred and this is the connection abort to close the session. vxcan1: j1939_xtp_rx_abort_one: 0xffff88802b507000: 0x00000: (3) A timeout occurred and this is the connection abort to close the session. ---------------- Code disassembly (best guess): 0: 84 c0 test %al,%al 2: 0f 85 96 13 00 00 jne 0x139e 8: e8 4b fb b4 ff call 0xffb4fb58 d: 4c 39 b4 24 78 01 00 cmp %r14,0x178(%rsp) 14: 00 15: 0f 84 d3 0d 00 00 je 0xdee 1b: 48 83 44 24 70 08 addq $0x8,0x70(%rsp) 21: e8 32 fb b4 ff call 0xffb4fb58 26: 49 83 c4 08 add $0x8,%r12 * 2a: 49 81 c6 00 10 00 00 add $0x1000,%r14 <-- trapping instruction 31: e9 af f0 ff ff jmp 0xfffff0e5 36: e8 1d fb b4 ff call 0xffb4fb58 3b: 49 rex.WB 3c: bf .byte 0xbf 3d: 00 00 add %al,(%rax)