netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Wiesner <jwiesner@suse.de>
To: Xin Long <lucien.xin@gmail.com>
Cc: Eric Dumazet <edumazet@google.com>,
	netdev@vger.kernel.org, David Ahern <dsahern@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [RFC PATCH] ipv6: route: release reference of dsts cached in sockets
Date: Thu, 3 Oct 2024 19:01:26 +0200	[thread overview]
Message-ID: <20241003170126.GA20362@incl> (raw)
In-Reply-To: <CADvbK_cmi_ppJyPwmh77dHgkm=Lh52vtEWddwSAFNhZpmmev6Q@mail.gmail.com>

On Wed, Oct 02, 2024 at 04:27:55PM -0400, Xin Long wrote:
> On Tue, Oct 1, 2024 at 11:26 AM Jiri Wiesner <jwiesner@suse.de> wrote:
> > I am afraid this patch is misguided. I would still like to find the source of the dst leak but I am also running out of time which the customer is willing to invest into investigating this issue.
> Is your kernel including this commit?
> 
> commit 28044fc1d4953b07acec0da4d2fc4784c57ea6fb
> Author: Joanne Koong <joannelkoong@gmail.com>
> Date:   Mon Aug 22 11:10:21 2022 -0700
> 
>     net: Add a bhash2 table hashed by port and address
> 
> After this commit, it seems in tcp_v6_connect(), the 'goto failure'
> may cause a dst leak.:
> 
>         dst = ip6_dst_lookup_flow(net, sk, &fl6, final_p);
>         ...
>         if (!saddr) {
>                 saddr = &fl6.saddr;
> 
>                 err = inet_bhash2_update_saddr(sk, saddr, AF_INET6);
>                 if (err)
>                         goto failure; <---
>         }
>         ...
>         ip6_dst_store(sk, dst, NULL, NULL);

Thanks for pointing this out. 28044fc1d495 seems to be an interesting commit as far as the number of Fixes is concerned. The commit was not backported to the 5.14-based SLES kernels, for which the unbalaced refcount bug was reported. The commit is part of the 6.4-based SLES kernels so I will have to see if all the patches with Fixes tags have been backported.
J.

  reply	other threads:[~2024-10-03 17:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-30 18:09 [RFC PATCH] ipv6: route: release reference of dsts cached in sockets Jiri Wiesner
2024-09-30 18:27 ` Eric Dumazet
2024-10-01 15:26   ` Jiri Wiesner
2024-10-02 20:27     ` Xin Long
2024-10-03 17:01       ` Jiri Wiesner [this message]
2024-10-06 18:25         ` Xin Long
2024-10-09 13:39           ` Jiri Wiesner
2024-11-12  8:56           ` Jiri Wiesner
2024-11-12 21:51             ` Xin Long
2024-11-13 10:59               ` Jiri Wiesner
2024-11-13 17:27               ` David Ahern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241003170126.GA20362@incl \
    --to=jwiesner@suse.de \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=lucien.xin@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).