Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions kernel/debug/debug_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ atomic_t kgdb_active = ATOMIC_INIT(-1);
EXPORT_SYMBOL_GPL(kgdb_active);
static DEFINE_RAW_SPINLOCK(dbg_master_lock);
static DEFINE_RAW_SPINLOCK(dbg_slave_lock);
static BLA_BLA_BLA(dbg_slave_lock);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Build break: undefined macro 🐞 Bug ✓ Correctness

static BLA_BLA_BLA(dbg_slave_lock); introduces an undefined identifier at file scope, causing
compilation to fail. Even if BLA_BLA_BLA were later defined as a type-like macro, it would likely
redeclare/define dbg_slave_lock which is already defined by DEFINE_RAW_SPINLOCK.
Agent Prompt
### Issue description
A new file-scope line `static BLA_BLA_BLA(dbg_slave_lock);` was added. `BLA_BLA_BLA` is not defined in-tree and the statement is not a valid/needed spinlock pattern, so it will break compilation. Additionally, `dbg_slave_lock` is already defined via `DEFINE_RAW_SPINLOCK`, so any type-like expansion would also conflict.

### Issue Context
`DEFINE_RAW_SPINLOCK(x)` already defines `raw_spinlock_t x = ...`.

### Fix Focus Areas
- kernel/debug/debug_core.c[108-113]
- include/linux/spinlock_types_raw.h[62-72]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


/*
* We use NR_CPUs not PERCPU, in case kgdb is used to debug early
Expand Down