[PATCH bpf-next 1/3] selftests/bpf: Remove sockmap update from bpf_iter_unix

From: Michal Luczaj

Date: Fri Oct 16 2026 - 17:37:09 EST


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>
---
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;
}

--
2.56.0