mailbox: synchronize NPCM channel shutdown - #576
Open
helloxiling wants to merge 1 commit into
Open
Conversation
NPCM clients can be removed while the threaded mailbox IRQ is handling a response. The existing shutdown path frees channel metadata before the mailbox core clears the client pointer. This can race the controller handler and client callback. Keep channel metadata for the controller lifetime, mark it inactive before shutdown, and synchronize the IRQ. Also acknowledge inactive doorbells so the shared IRQ cannot retrigger indefinitely. Signed-off-by: xilingsun <xilingsun@microsoft.com>
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.
Summary
NPCM mailbox clients can be removed while the threaded controller IRQ is handling a response. The previous shutdown path could release client state while a late callback was still running.
Motivation
This is a standalone mailbox lifetime fix. It is also required before the NPCM Composite EAT mailbox client can safely support unbind and late responses.
Validation
scripts/checkpatch.pl --strict: 0 errors, warnings, or checksgit diff --check: passW=1mailbox/client directory build: passThe pre-existing probe error-path double-unregister is outside this change and should be handled separately.