scx_ops_sanitize_err(9)
okay bestie, welcome to scx_ops_sanitize_err(9) from the Kernel API Manual π«Ά this page is lowkey about making sure a -errno value is valid before it wrecks the vibe π
πΈ NAME πΈ
scx_ops_sanitize_err β sanitize a -errno value β¨
β¨ SYNOPSIS β¨
int scx_ops_sanitize_err (struct scx_sched *sch , const char *ops_name ,
s32 err );
π ARGUMENTS π
schβ thescx_schedto error out on error πops_nameβ the operation to blame on failure πerrβ the-errnovalue to sanitize π§
π DESCRIPTION π
so what it does is verify that err is a valid -errno π. if it's not, it triggers scx_error and returns -EPROTO π¨.
this is necessary because returning a rogue -errno up the chain can cause misbehaviors π. for an example, a large negative return from ops.init_task triggers an oops when passed up the call chain because the value fails IS_ERR test after being encoded with ERR_PTR and then is handled as a pointer π. not the main character energy we want, fr fr.
π¦ SEE ALSO π¦
peep these, bestie: the kernel file ./kernel/sched/ext/internal.h, plus scx_add_event(9), __scx_add_event(9), struct scx_enable_args(9), struct sched_ext_ops(9), struct sched_ext_ops_cid(9), scx_arena_to_kaddr(9), scx_kaddr_to_arena(9), DEFINE_SCX_COMPAT_MARKER(9), scx_root_protected_live(9), scx_root_protected(9), scx_bypass_dsp_enabled(9), scx_has_subs(9), scx_task_sched(9), scx_task_sched_rcu(9), scx_task_on_sched(9), scx_prog_sched(9), and scx_parent(9) π.
okay that's the whole page β signing off from ./kernel/sched/ext, October 2026, mwah π«Άπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms