Re: [PATCH tip/locking/core] compiler-context-analysis: Support immediate acquisition after initialization
From: Peter Zijlstra
Date: Thu Jan 15 2026 - 16:33:14 EST
On Thu, Jan 15, 2026 at 01:51:25AM +0100, Marco Elver wrote:
> Longer-term, Peter suggested to create scoped init-guards [1], which
> will both fix the issue in a more robust way and also denote clearly
> where initialization starts and ends. However, that requires new APIs,
> and won't help bridge the gap for code that just wants to opt into the
> analysis with as little other changes as possible (as suggested in [2]).
OTOH, switching to that *now*, while we have minimal files with
CONTEXT_ANALYSIS enabled, is the easiest it will ever get.
The more files get enabled, the harder it gets to switch, no?