Repository navigation
drm/apple: afk: one initializer for an endpoint's locks and queues - #1444
Merged
Merged
Conversation
afk_fail_commands_locked() wakes the endpoint's compact_orphan_wq, which afk_init() initializes. The AV lifetime KUnit fixtures build endpoints by hand and never initialized it, so the first av_audiosrv_cleanup() through afk_quiesce() woke a zeroed wait queue: Unable to handle kernel NULL pointer dereference at virtual address 0 pc : __wake_up_common+0x40/0xe8 __wake_up+0x44/0x78 afk_fail_commands_locked+0xb0/0xc4 afk_quiesce+0x60/0x100 av_audiosrv_cleanup+0x88/0x100 and every later suite in the run crashed with it (2 of 17 passed). Add afk_ep_init_state() for the locks, command list, wait queues and completions every endpoint needs before use, start afk_init() from it, and use it for the endpoints the KUnit fixtures build, so a field added to the endpoint is initialized for them too. KUnit (arm64): apple-av-audio-lifetime 17/17 (was 2 passed, 15 crashed); apple-* 298/299, one skipped. Assisted-by: LLM Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
This was referenced Nov 11, 2026
Merged
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.
afk_fail_commands_locked()wakes the endpoint'scompact_orphan_wq, whichafk_init()initializes. The AV lifetime KUnit fixtures build endpoints by hand and never initialized it, so the firstav_audiosrv_cleanup()throughafk_quiesce()woke a zeroed wait queue (NULL dereference in__wake_up_commonfromafk_fail_commands_locked), and every later suite in the run crashed with it.This adds
afk_ep_init_state()for the locks, command list, wait queues and completions every endpoint needs before use.afk_init()starts from it, and the endpoints the KUnit fixtures build use it, so a field added to the endpoint is initialized there too.afk_init()itself initializes the same state as before.Tested on integration/aurora aab4394 + this commit, KUnit arm64:
apple-av-audio-lifetime: 17/17 (before: 2 passed, 15 crashed).apple-*: 298/299, one skipped, no build warnings.afk.oandav.obuild with-Werror.🤖 Generated with Claude Code