Re: [PATCH bpf-next v3 1/8] selftests/bpf: Remove sockmap update from bpf_iter_unix
From: Jiayuan Chen
Date: Sun Nov 08 2026 - 21:16:01 EST
On 11/8/26 1:58 AM, Michal Luczaj wrote:
> BPF iterator programs that can update sockmaps will be limited to
> iter/sockmap. Remove the update from the unix selftest.
>
> This reverts commit 997b8483d44c ("selftests/bpf: Extend bpf_iter_unix to
> attempt deadlocking").
>
> Signed-off-by: Michal Luczaj <mhal@xxxxxxx>
Reviewed-by: Jiayuan Chen <jiayuan.chen@xxxxxxxxx>
> ---
> tools/testing/selftests/bpf/progs/bpf_iter_unix.c | 10 ----------
> 1 file changed, 10 deletions(-)
>
> diff --git a/tools/testing/selftests/bpf/progs/bpf_iter_unix.c b/tools/testing/selftests/bpf/progs/bpf_iter_unix.c
> index 3061b148f338..90beada0386d 100644
> --- a/tools/testing/selftests/bpf/progs/bpf_iter_unix.c
> +++ b/tools/testing/selftests/bpf/progs/bpf_iter_unix.c
> @@ -7,13 +7,6 @@
>
> char _license[] SEC("license") = "GPL";
>
> -SEC(".maps") struct {
> - __uint(type, BPF_MAP_TYPE_SOCKMAP);
> - __uint(max_entries, 1);
> - __type(key, __u32);
> - __type(value, __u64);
> -} sockmap;
> -
> static long sock_i_ino(const struct sock *sk)
> {
> const struct socket *sk_socket = sk->sk_socket;
> @@ -82,8 +75,5 @@ int dump_unix(struct bpf_iter__unix *ctx)
>
> BPF_SEQ_PRINTF(seq, "\n");
>
> - /* Test for deadlock. */
> - bpf_map_update_elem(&sockmap, &(int){0}, sk, 0);
> -
> return 0;
> }
>