Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: x86_pmu_handle_irq+0x3b7/0x3c0
CPU: 0 PID: 15435 Comm: syz-executor.2 Not tainted 6.1.0-rc4-next-20221109 #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
Call Trace:
dump_stack_lvl+0x8f/0xb7
panic+0x291/0x601
__stack_chk_fail+0x19/0x20
x86_pmu_handle_irq+0x3b7/0x3c0
Kernel Offset: disabled
================================
WARNING: inconsistent lock state
6.1.0-rc4-next-20221109 #1 Not tainted
--------------------------------
inconsistent {INITIAL USE} -> {IN-NMI} usage.
syz-executor.2/15435 [HC1[1]:SC0[0]:HE0:SE1] takes:
ffffffff853fb418 ((console_sem).lock){-...}-{2:2}, at: down_trylock+0x12/0x70
{INITIAL USE} state was registered at:
irq event stamp: 560
hardirqs last enabled at (559): [] _raw_spin_unlock_irqrestore+0x2c/0x60
hardirqs last disabled at (560): [] generic_exec_single+0x1ff/0x300
softirqs last enabled at (510): [] __irq_exit_rcu+0x11b/0x180
softirqs last disabled at (505): [] __irq_exit_rcu+0x11b/0x180
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock((console_sem).lock);
lock((console_sem).lock);
*** DEADLOCK ***
4 locks held by syz-executor.2/15435:
#0: ffff888018cd05e0 (&sig->exec_update_lock){++++}-{3:3}, at: __do_sys_perf_event_open+0x637/0x2880
#1: ffff8880368358a8 (&ctx->mutex){+.+.}-{3:3}, at: __do_sys_perf_event_open+0x98d/0x2880
#2: ffff88806d034838 (&cpuctx_lock){-.-.}-{2:2}, at: __perf_install_in_context+0xb6/0x8d0
#3: ffff888036835818 (&ctx->lock){-.-.}-{2:2}, at: __perf_install_in_context+0xec/0x8d0
stack backtrace:
CPU: 0 PID: 15435 Comm: syz-executor.2 Not tainted 6.1.0-rc4-next-20221109 #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
Call Trace:
dump_stack_lvl+0x8f/0xb7
lock_acquire.cold+0x3b/0x40
_raw_spin_lock_irqsave+0x3d/0x60
down_trylock+0x12/0x70
__down_trylock_console_sem+0x3b/0xd0
console_unblank+0x33/0x170
panic+0x33f/0x601
__stack_chk_fail+0x19/0x20
x86_pmu_handle_irq+0x3b7/0x3c0