genirq: Flags mismatch irq 4. 00200000 (pcl812) vs. 00200080 (ttyS0) ============================================ WARNING: possible recursive locking detected syzkaller #0 Tainted: G L -------------------------------------------- syz.9.5121/26098 is trying to acquire lock: ffff88805085e160 (&rmidi->open_mutex){+.+.}-{4:4}, at: class_mutex_constructor include/linux/mutex.h:253 [inline] ffff88805085e160 (&rmidi->open_mutex){+.+.}-{4:4}, at: snd_rawmidi_kernel_open+0xa4/0x190 sound/core/rawmidi.c:422 but task is already holding lock: ffff88804d313d60 (&rmidi->open_mutex){+.+.}-{4:4}, at: snd_rawmidi_open+0x296/0xba0 sound/core/rawmidi.c:467 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&rmidi->open_mutex); lock(&rmidi->open_mutex); *** DEADLOCK *** May be due to missing lock nesting notation 2 locks held by syz.9.5121/26098: #0: ffff88804d313d60 (&rmidi->open_mutex){+.+.}-{4:4}, at: snd_rawmidi_open+0x296/0xba0 sound/core/rawmidi.c:467 #1: ffff88805085e460 (&ump->open_mutex){+.+.}-{4:4}, at: class_mutex_constructor include/linux/mutex.h:253 [inline] #1: ffff88805085e460 (&ump->open_mutex){+.+.}-{4:4}, at: snd_ump_legacy_open+0x120/0x4e0 sound/core/ump.c:1153 stack backtrace: CPU: 3 UID: 0 PID: 26098 Comm: syz.9.5121 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_deadlock_bug.cold+0xbd/0xca kernel/locking/lockdep.c:3041 check_deadlock kernel/locking/lockdep.c:3093 [inline] validate_chain kernel/locking/lockdep.c:3895 [inline] __lock_acquire+0x1256/0x1a40 kernel/locking/lockdep.c:5237 lock_acquire kernel/locking/lockdep.c:5868 [inline] lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825 __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821 class_mutex_constructor include/linux/mutex.h:253 [inline] snd_rawmidi_kernel_open+0xa4/0x190 sound/core/rawmidi.c:422 snd_ump_legacy_open+0x367/0x4e0 sound/core/ump.c:1160 open_substream+0x480/0x970 sound/core/rawmidi.c:348 rawmidi_open_priv+0x595/0x6f0 sound/core/rawmidi.c:397 snd_rawmidi_open+0x4c9/0xba0 sound/core/rawmidi.c:485 snd_open+0x201/0x450 sound/core/sound.c:166 chrdev_open+0x234/0x6a0 fs/char_dev.c:411 do_dentry_open+0x6ab/0x14d0 fs/open.c:947 vfs_open+0x82/0x3f0 fs/open.c:1052 do_open fs/namei.c:4700 [inline] path_openat+0x2873/0x4280 fs/namei.c:4863 do_file_open+0x20e/0x430 fs/namei.c:4892 do_sys_openat2+0x10f/0x1e0 fs/open.c:1368 do_sys_open fs/open.c:1374 [inline] __do_compat_sys_openat fs/open.c:1436 [inline] __se_compat_sys_openat fs/open.c:1434 [inline] __ia32_compat_sys_openat+0x12d/0x210 fs/open.c:1434 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] do_int80_emulation+0x14b/0x720 arch/x86/entry/syscall_32.c:172 asm_int80_emulation+0x1a/0x20 arch/x86/include/asm/idtentry.h:598 RIP: 0023:0xf71e72eb Code: 57 56 53 8b 44 24 14 f6 00 08 75 23 8b 44 24 18 8b 5c 24 1c 8b 4c 24 20 8b 54 24 24 8b 74 24 28 8b 7c 24 2c 8b 6c 24 30 cd 80 <5b> 5e 5f 5d c3 5b 5e 5f 5d e9 f7 a1 ff ff 66 90 66 90 66 90 90 53 RSP: 002b:00000000f549d03c EFLAGS: 00000246 ORIG_RAX: 0000000000000127 RAX: ffffffffffffffda RBX: 00000000ffffff9c RCX: 00000000f549d100 RDX: 0000000000141102 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ---------------- Code disassembly (best guess): 0: 57 push %rdi 1: 56 push %rsi 2: 53 push %rbx 3: 8b 44 24 14 mov 0x14(%rsp),%eax 7: f6 00 08 testb $0x8,(%rax) a: 75 23 jne 0x2f c: 8b 44 24 18 mov 0x18(%rsp),%eax 10: 8b 5c 24 1c mov 0x1c(%rsp),%ebx 14: 8b 4c 24 20 mov 0x20(%rsp),%ecx 18: 8b 54 24 24 mov 0x24(%rsp),%edx 1c: 8b 74 24 28 mov 0x28(%rsp),%esi 20: 8b 7c 24 2c mov 0x2c(%rsp),%edi 24: 8b 6c 24 30 mov 0x30(%rsp),%ebp 28: cd 80 int $0x80 * 2a: 5b pop %rbx <-- trapping instruction 2b: 5e pop %rsi 2c: 5f pop %rdi 2d: 5d pop %rbp 2e: c3 ret 2f: 5b pop %rbx 30: 5e pop %rsi 31: 5f pop %rdi 32: 5d pop %rbp 33: e9 f7 a1 ff ff jmp 0xffffa22f 38: 66 90 xchg %ax,%ax 3a: 66 90 xchg %ax,%ax 3c: 66 90 xchg %ax,%ax 3e: 90 nop 3f: 53 push %rbx