Thread (4 messages) 4 messages, 4 authors, 23d ago

Re: [PATCH bpf v3] bpf, sockmap: Fix self-redirect copied_seq double-counting

flat view

From: patchwork-bot+netdevbpf@kernel.org
Date: 2026-09-14 05:01:12
Also in: bpf

Hello:

This patch was applied to bpf/bpf.git (master)
by Alexei Starovoitov [off-list ref]:

On Tue,  8 Sep 2026 17:08:32 +0800 you wrote:
From: Geliang Tang <redacted>

When a BPF stream_verdict program redirects an skb back to the same
socket (self-redirect with BPF_F_INGRESS), sk_psock_verdict_apply()
calls tcp_eat_skb() which advances tcp_sk->copied_seq. However, the
skb is then delivered to the socket's psock ingress queue and later
read by tcp_bpf_recvmsg_parser(), which also advances copied_seq via
the copied_from_self accounting path. This double-counting causes
copied_seq to advance by 2x the actual data length, triggering:

[...]
Here is the summary with links:
  - [bpf,v3] bpf, sockmap: Fix self-redirect copied_seq double-counting
    https://git.kernel.org/bpf/bpf/c/490a83d6386e

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help