Hello, On Wed, Sep 03, 2025 at 11:33:27AM +0200, Andrea Righi wrote: > static int validate_ops(struct scx_sched *sch, const struct sched_ext_ops *ops) > @@ -5627,11 +5630,15 @@ static int scx_enable(struct sched_ext_ops *ops, struct bpf_link *link) > if (((void (**)(void))ops)[i]) > set_bit(i, sch->has_op); > > - check_hotplug_seq(sch, ops); > - scx_idle_update_selcpu_topology(ops); > + ret = check_hotplug_seq(sch, ops); > + if (!ret) > + scx_idle_update_selcpu_topology(ops); > > cpus_read_unlock(); > > + if (ret) > + goto err_disable; The double testing is a bit jarring. Maybe just add cpus_read_unlock() in the error block so that error return can take place right after check_hotplug_seq()? Alternatively, create a new error jump target - e.g. err_disable_unlock_cpus and share it between here and the init failure path? Thanks. -- tejun