From: Jakub Kicinski <kuba@kernel.org>
To: Justin Iurman <justin.iurman@uliege.be>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org,
dsahern@kernel.org
Subject: Re: [PATCH net 2/2] net: ipv6: fix dst ref loops in rpl, seg6 and ioam6 lwtunnels
Date: Wed, 29 Jan 2025 12:14:08 -0800 [thread overview]
Message-ID: <20250129121408.0fe5d481@kernel.org> (raw)
In-Reply-To: <4a30a0aa-2893-4f6a-a858-61e51b2430b2@uliege.be>
On Wed, 29 Jan 2025 17:50:14 +0100 Justin Iurman wrote:
> > + if (dst->lwtstate != cache_dst->lwtstate) {
> > + local_bh_disable();
> > + dst_cache_set_ip6(&ilwt->cache, cache_dst, &fl6.saddr);
> > + local_bh_enable();
> > + }
>
> I agree the above patch fixes what kmemleak reported. However, I think
> it'd bring the double-reallocation issue back when the packet
> destination did not change (i.e., cache will always be empty). I'll try
> to come up with a solution...
True, dunno enough about use cases so I may be missing the point.
But the naive solution would be to remember that the tunnel "doesn't
re-route" and use dst directly, instead of cache_dst?
next prev parent reply other threads:[~2025-01-29 20:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-29 2:13 [PATCH net 1/2] net: ipv6: fix dst refleaks in rpl, seg6 and ioam6 lwtunnels Jakub Kicinski
2025-01-29 2:13 ` [PATCH net 2/2] net: ipv6: fix dst ref loops " Jakub Kicinski
2025-01-29 16:50 ` Justin Iurman
2025-01-29 20:14 ` Jakub Kicinski [this message]
2025-01-30 0:24 ` Justin Iurman
2025-01-29 16:10 ` [PATCH net 1/2] net: ipv6: fix dst refleaks " Justin Iurman
2025-01-29 16:17 ` Justin Iurman
2025-01-29 20:23 ` Jakub Kicinski
2025-01-30 0:16 ` Justin Iurman
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=20250129121408.0fe5d481@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=justin.iurman@uliege.be \
--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).