possible deadlock in console_lock_spinning_enable

From: Rani Irawan

Date: Mon Jun 29 2026 - 02:38:50 EST


Dear Linux maintainers and Syzkaller team,


We would like to report a bug found by our modified Syzkaller. This bug involves perf_event_open(), which triggers an Intel PMU event, causing an unchecked MSR access and a lockdep circular locking warning. The first visible error is:


unchecked MSR access error: WRMSR to 0x186

tried to write 0x00000001045106fb

intel_pmu_enable_event+0xd37/0x12a0 arch/x86/events/intel/core.c:3309


After that, printk emits the MSR warning while perf is still holding &ctx->lock, so lockdep reports:


WARNING: possible circular locking dependency detected

possible deadlock in console_lock_spinning_enable


Linux kernel commit: 4edcdefd4083ae04b1a5656f4be6cd83ae919ef4 (7.1.0-14063-g4edcdefd4083).


Attached to this email:

  1. Kernel config
  2. Syzkaller report
  3. Repro program (in .c and .txt)


This is the command used to run the repro (please change “/path-to” to the actual path):

On one terminal:

On another terminal (set the $SSHKEY, $PORT):


Please let me know if any additional information is needed.

Thank you and have a good day!


Best,

Rani


Attachment: config-report
Description: config-report

Attachment: report0
Description: report0

Attachment: repro-9c8.c
Description: repro-9c8.c

perf_event_open(&(0x7f0000000180)={0x4, 0x80, 0xfb, 0x6, 0x9, 0x4, 0x801, 0x1, 0xd1f, 0x5, 0x0, 0x1, 0x1, 0x0, 0x0, 0x1, 0x1, 0x0, 0x1, 0x1, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x0, 0x1, 0x1, 0x0, 0x1, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x4, @perf_bp={0x0, 0x8}, 0x10000, 0x6, 0x93, 0x4, 0x4714, 0x8, 0x1, 0x0, 0x0, 0x0, 0x5}, 0x0, 0xffffffffffffffff, 0xffffffffffffffff, 0xb)