On 1/10/25 5:21 AM, Michal Luczaj wrote:
As pointed out in the original comment, lookup in sockmap can return a TCP ESTABLISHED socket. Such TCP socket may have had SO_ATTACH_REUSEPORT_EBPF set before it was ESTABLISHED. In other words, a non-NULL sk_reuseport_cb does not imply a non-refcounted socket. Drop sk's reference in both error paths.
Reviewed-by: Martin KaFai Lau <martin.lau@xxxxxxxxxx> Jakub, can you directly take this to the net tree? Thanks!