Repository navigation
Accept single-bit ranges in bitmap lists - #15448
Merged
Merged
Conversation
Writing "1-1" to cpuset.cpus failed with EINVAL because the bitmap parser rejected ranges with equal endpoints. CpusetCgroup.SetMask reaches this case on a two-CPU system when it removes CPU 0 from the initial mask. Linux accepts equal endpoints as a single-bit range [1]. Reject only descending ranges and correct the existing parser case that expected an equal-endpoint range to fail. This applies to both cgroup versions, whose CPU and memory-node masks use the same parser. [1]: https://github.com/torvalds/linux/blob/e5f0a698b/lib/bitmap-str.c#L220-L231 Assisted-by: OpenAI Codex
copybara-service
Bot
requested review from
EtiennePerot and
fvoznika
as code owners
October 7, 2026 16:47
copybara-service
Bot
force-pushed
the
test/cl995164008
branch
2 times, most recently
from
October 7, 2026 17:58
3341a35 to
6dff921
Compare
PiperOrigin-RevId: 995285602
copybara-service
Bot
force-pushed
the
test/cl995164008
branch
from
October 7, 2026 23:40
6dff921 to
f59c2c5
Compare
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.
Accept single-bit ranges in bitmap lists
Writing "1-1" to cpuset.cpus failed with EINVAL because the bitmap parser rejected ranges with equal endpoints. CpusetCgroup.SetMask reaches this case on a two-CPU system when it removes CPU 0 from the initial mask. Linux accepts equal endpoints as a single-bit range 1.
Reject only descending ranges and correct the existing parser case that expected an equal-endpoint range to fail. This applies to both cgroup versions, whose CPU and memory-node masks use the same parser.
Assisted-by: OpenAI Codex
FUTURE_COPYBARA_INTEGRATE_REVIEW=#15446 from tamird:bitmap-inclusive-ranges 01d6bdf