From: Alexei Starovoitov Date: Mon, 22 Jun 2026 01:10:04 +0000 (-0700) Subject: Merge branch 'fix-effective-prog-array-indexing-with-bpf_f_preorder' X-Git-Tag: v7.2-rc1~25^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3d8e6fef15db07c9247c1301ec6fa5532d15feb8;p=thirdparty%2Flinux.git Merge branch 'fix-effective-prog-array-indexing-with-bpf_f_preorder' Amery Hung says: ==================== Fix effective prog array indexing with BPF_F_PREORDER This patchset fixes a cgroup effective-array indexing bug where replace_effective_prog() and purge_effective_progs() used a linear hlist position that doesn't match the array layout when BPF_F_PREORDER programs are present, corrupting the array on link update and risking a use-after-free in the detach fallback. It computes the slot via a shared effective_prog_pos() helper and adds a cgroup_preorder selftest. Changelog v1 -> v2: - Also fix purge_effective_progs(), in addition to replace_effective_prog() (Sashiko). - selftest: Set err on bpf_link_create() failure so the failure is reported to the caller (Sashiko). ==================== Link: https://patch.msgid.link/20260619063520.2690547-1-ameryhung@gmail.com Signed-off-by: Alexei Starovoitov --- 3d8e6fef15db07c9247c1301ec6fa5532d15feb8