Re: [PATCH v3 3/3] bpf: Restore sysctl new-value from 1 to 0

From: bot+bpf-ci

Date: Wed Jun 03 2026 - 07:40:02 EST


> diff --git a/kernel/bpf/cgroup.c b/kernel/bpf/cgroup.c
> index 4bf0ec94e719..35d1f1428ef3 100644
> --- a/kernel/bpf/cgroup.c
> +++ b/kernel/bpf/cgroup.c
> @@ -1936,7 +1936,7 @@ int __cgroup_bpf_run_filter_sysctl(struct ctl_table_header *head,
>
> kfree(ctx.cur_val);
>
> - if (ret == 1 && ctx.new_updated) {
> + if (!ret && ctx.new_updated) {

The success check now tests !ret, but the kerneldoc above
__cgroup_bpf_run_filter_sysctl() still describes the old convention:

kernel/bpf/cgroup.c:
* This function will return %-EPERM if an attached program is found and
* returned value != 1 during execution. In all other cases 0 is returned.

Since bpf_prog_run_array_cg() returns 0 on success rather than 1, should
that line read "returned value != 0" to match the new check?

This was raised by the bpf-ci reviewer on both v1 and v2
(https://lore.kernel.org/all/45201482368d330f6301ea4d90e29fa1585bf985c12a191d9fcd975087eb0649@xxxxxxxxxxxxxxx/)
but the wording does not appear to have changed in v3.


---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/26881443787