summaryrefslogtreecommitdiff
path: root/include/linux/debugobjects.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2026-09-22 01:06:27 +0000
committerJakub Kicinski <kuba@kernel.org>2026-09-22 19:02:59 -0700
commit944ae66642b726bd6b25ae71b1e9ff88a0e0bdb0 (patch)
treee5f25bd2317979b8b6b2b7922f4538ac3367da3e /include/linux/debugobjects.h
parent776b5abf3fa3b0052daa6d3f01b8e964a03a898c (diff)
tcp: remove dead code in tcp_rcv_state_process()
Since commit 3d501dd326fb ("tcp: do not accept ACK of bytes we never sent"), tcp_ack() bounds the acceptable old ACK window by min(tp->max_window, tp->bytes_acked). When sk->sk_state == TCP_SYN_RECV, tp->bytes_acked is always 0, so any segment with before(ack, prior_snd_una) immediately returns -SKB_DROP_REASON_TCP_TOO_OLD_ACK and never reaches the old_ack label (which returns 0). Therefore, tcp_ack() can only return 0 in closing states (where old ACKs are accepted), and can never return 0 in TCP_SYN_RECV. Simplify the tcp_ack() return value check in tcp_rcv_state_process() to only check for negative return values and remove the unreachable !reason branch. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Xuanqiang Luo <luoxuanqiang@kylinos.cn> Link: https://patch.msgid.link/20260922010627.2291980-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions