]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tcp_bpf: properly release resources on error paths
authorPaolo Abeni <pabeni@redhat.com>
Tue, 17 Oct 2023 15:49:51 +0000 (17:49 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 19 Oct 2023 01:09:31 +0000 (18:09 -0700)
commit68b54aeff804acceb02f228ea2e28419272c1fb9
tree2ee3946a361acf50f951e4b6bda9cbaad27e0d49
parenta13b67c9a015c4e21601ef9aa4ec9c5d972df1b4
tcp_bpf: properly release resources on error paths

In the blamed commit below, I completely forgot to release the acquired
resources before erroring out in the TCP BPF code, as reported by Dan.

Address the issues by replacing the bogus return with a jump to the
relevant cleanup code.

Fixes: 419ce133ab92 ("tcp: allow again tcp_disconnect() when threads are waiting")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Jakub Sitnicki <jakub@cloudflare.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/r/8f99194c698bcef12666f0a9a999c58f8b1cb52c.1697557782.git.pabeni@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/tcp_bpf.c