Repository navigation
Use test_bit for RPC_PRIVATE in homa_rpc_get_info - #139
Open
randomizedcoder wants to merge 1 commit into
Open
randomizedcoder wants to merge 1 commit into
randomizedcoder wants to merge 1 commit into
Conversation
* RPC_PRIVATE is a bit number (2), set with set_bit, but homa_rpc_get_info tested it as a mask, which checks bit 1 (APP_NEEDS_LOCK). HOMAIOCINFO therefore never reported HOMA_RPC_PRIVATE for private RPCs, and reported it for RPCs whose lock was being requested by the application. * The existing test set the flag with |=, which hid the bug; use set_bit and add a test that APP_NEEDS_LOCK alone isn't reported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
RPC_PRIVATEis a bit number (2), set withset_bitand read withtest_biteverywhere else, buthoma_rpc_get_infoused it as a mask, i.e. tested bit 1 (APP_NEEDS_LOCK). HOMAIOCINFO never reportedHOMA_RPC_PRIVATEfor private RPCs, and reported it while the application was asking for the RPC lock.test_bit(RPC_PRIVATE, &rpc->flags).homa_rpc_get_info__HOMA_RPC_PRIVATEset the flag with|=, which hid the bug; it now usesset_bit. Newhoma_rpc_get_info__APP_NEEDS_LOCK_is_not_private.Verified: the new test fails before the fix and passes after; full unit suite 885/885 in both IPv6 and
--ipv4modes;homa.kocompiles warning-free on 7.3, normal and__STRIP__=1; checkpatch clean.🤖 Generated with Claude Code