Skip to content

Accept single-bit ranges in bitmap lists - #15448

Merged
copybara-service[bot] merged 2 commits into
masterfrom
test/cl995164008
Oct 7, 2026
Merged

copybara-service[bot] merged 2 commits into
masterfrom
test/cl995164008

Conversation

@copybara-service

Copy link
Copy Markdown

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

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 copybara-service Bot added the exported Issue was exported automatically label Oct 7, 2026
@copybara-service
copybara-service Bot force-pushed the test/cl995164008 branch 2 times, most recently from 3341a35 to 6dff921 Compare October 7, 2026 17:58
@copybara-service
copybara-service Bot merged commit f59c2c5 into master Oct 7, 2026
2 of 4 checks passed
@copybara-service
copybara-service Bot deleted the test/cl995164008 branch October 7, 2026 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants