Repository navigation
pmdomain: apple: pmp-report: initialize the report lock - #56
Merged
DjDeveloperr merged 1 commit intoSep 29, 2026
Merged
DjDeveloperr merged 1 commit into
DjDeveloperr merged 1 commit into
Conversation
apple_pmp_report_probe() allocates the report with devm_kzalloc() but never initializes rep->lock. The first apple_pmp_report_set_state() from a child entry's probe then takes an uninitialized spinlock; with lockdep this is reported as a non-static key and lockdep turns itself off for the rest of the boot: INFO: trying to register non-static key. ... _raw_spin_lock_irqsave apple_pmp_report_set_state apple_pmp_report_entry_probe Initialize the lock before of_platform_populate() creates the entries. Tested on j416s (M2 Pro) with PROVE_LOCKING: the report is gone and lockdep stays enabled. Fixes: e5f8c27 ("pmdomain: apple: Add PMP reporting interface") Signed-off-by: Oliver Lukschander <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
apple_pmp_report_probe()never initializesrep->lock. The firstapple_pmp_report_set_state()from an entry's probe takes the uninitialized spinlock. WithPROVE_LOCKING, lockdep reports a non-static key and switches itself off for the rest of the boot.One line:
spin_lock_init(&rep->lock)beforeof_platform_populate()creates the entries.Found while running a lockdep kernel for #8 on j416s (M2 Pro). With the fix, the report is gone and lockdep stays enabled. Builds with
W=1; checkpatch only flags the trailer form.🤖 Generated with Claude Code