New: sched_setattr: bug in `ERRORS` section w.r.t. `attr.sched_flags contains a flag other than SCHED_FLAG_RESET_ON_FORK`
https://bugzilla.kernel.org/show_bug.cgi?id=222094
Bug ID: 222094
Summary: sched_setattr: bug in ERRORS section w.r.t.
attr.sched_flags contains a flag other than SCHED_FLAG_RESET_ON_FORK
Product: Documentation
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: man-pages
Assignee: [email protected]
Reporter: [email protected]
Regression: No
Per https://www.man7.org/linux/man-pages/man2/sched_getattr.2.html:
This scenario documented in the manpage implies that attr.sched_flags must be set to SCHED_FLAG_RESET_ON_FORK:
Quoted 2 lines
EINVAL attr.sched_flags contains a flag other than
SCHED_FLAG_RESET_ON_FORK.
The second scenario implies that attr.sched_flags is a bitmask which can contain SCHED_FLAG_UTIL_CLAMP_MIN or SCHED_FLAG_UTIL_CLAMP_MAX:
Quoted 3 lines
EINVAL attr.sched_flags contains
SCHED_FLAG_UTIL_CLAMP_MINorSCHED_FLAG_UTIL_CLAMP_MAX, and attr.sched_util_min or attr.sched_util_max are out of bounds.
The first case contradicts the second case.
Doing some digging in the kernel source code [1], I couldn't find an obvious spot where the first scenario was actually implemented -> **I think the SCHED_FLAG_RESET_ON_FORK scenario is a documentation bug.**
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 222094] sched_setattr: bug in `ERRORS` section w.r.t. `attr.sched_flags contains a flag other than SCHED_FLAG_RESET_ON_FORK`
https://bugzilla.kernel.org/show_bug.cgi?id=222094
--- Comment #1 from Alejandro Colomar ([email protected]) --- Hello,
Quoted 5 lines
Date: 2026-10-05 15:31:25+0000
From: [email protected]
[...]
Quoted 19 lines
Per https://www.man7.org/linux/man-pages/man2/sched_getattr.2.html:
This scenario documented in the manpage implies that
attr.sched_flagsmust be
set toSCHED_FLAG_RESET_ON_FORK:Quoted 2 lines
EINVAL attr.sched_flags contains a flag other than
SCHED_FLAG_RESET_ON_FORK.The second scenario implies that
attr.sched_flagsis a bitmask which can containSCHED_FLAG_UTIL_CLAMP_MINorSCHED_FLAG_UTIL_CLAMP_MAX:Quoted 3 lines
EINVAL attr.sched_flags contains
SCHED_FLAG_UTIL_CLAMP_MINorSCHED_FLAG_UTIL_CLAMP_MAX, and attr.sched_util_min or attr.sched_util_max are out of bounds.The first case contradicts the second case.
Quoted 7 lines
Doing some digging in the kernel source code [1], I couldn't find an obvious spot where the first scenario was actually implemented -> **I think the
SCHED_FLAG_RESET_ON_FORKscenario is a documentation bug.**1.
Would you want to send a patch? If so, please have a look at
<https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTIN>.
Have a lovely day!
Alex
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 222094] sched_setattr: bug in `ERRORS` section w.r.t. `attr.sched_flags contains a flag other than SCHED_FLAG_RESET_ON_FORK`
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=222094
--- Comment #2 from Enji Cooper ([email protected]) --- Created attachment 311258
--> https://bugzilla.kernel.org/attachment.cgi?id=311258&action=edit
Patch
I've honestly never submitted a patch to the Linux mailing lists. There are a lot of hoops to jump through in order to make a contribution... I'll try, but please bear with me (I'll probably get something wrong).
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 222094] sched_setattr: bug in `ERRORS` section w.r.t. `attr.sched_flags contains a flag other than SCHED_FLAG_RESET_ON_FORK`
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=222094
--- Comment #3 from Alejandro Colomar ([email protected]) --- Hi,
Quoted 5 lines
Date: 2026-10-23 18:47:22+0000
From: [email protected]
Quoted 8 lines
--- Comment #2 from Enji Cooper ([email protected]) --- Created attachment 311258
--> https://bugzilla.kernel.org/attachment.cgi?id=311258&action=edit
PatchI've honestly never submitted a patch to the Linux mailing lists. There are a lot of hoops to jump through in order to make a contribution... I'll try, but please bear with me (I'll probably get something wrong).
Sure! You're welcome to try. :-)
I've forwarded your patch to the mailing list in this email.
Have a lovely night!
Alex
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 222094] sched_setattr: bug in `ERRORS` section w.r.t. `attr.sched_flags contains a flag other than SCHED_FLAG_RESET_ON_FORK`
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=222094
--- Comment #4 from Alejandro Colomar ([email protected]) --- Created attachment 311260
--> https://bugzilla.kernel.org/attachment.cgi?id=311260&action=edit
signature.asc
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.