mbox series

[net-next,v2,0/2] Mitigate double allocations in ioam6_iptunnel

Message ID 20250415112554.23823-1-justin.iurman@uliege.be (mailing list archive)
Headers show
Series Mitigate double allocations in ioam6_iptunnel | expand

Message

Justin Iurman April 15, 2025, 11:25 a.m. UTC
v2:
- rephrase misleading comment
- move BH disable/enable around if condition
v1:
- https://lore.kernel.org/netdev/20250410152432.30246-1-justin.iurman@uliege.be/T/#t

Commit dce525185bc9 ("net: ipv6: ioam6_iptunnel: mitigate 2-realloc
issue") fixed the double allocation issue in ioam6_iptunnel. However,
since commit 92191dd10730 ("net: ipv6: fix dst ref loops in rpl, seg6
and ioam6 lwtunnels"), the fix was left incomplete. Because the cache is
now empty when the dst_entry is the same post transformation in order to
avoid a reference loop, the double reallocation is back for such cases
(e.g., inline mode) which are valid for IOAM. This patch provides a way
to detect such cases without having a reference loop in the cache, and
so to avoid the double reallocation issue for all cases again.

Justin Iurman (2):
  net: ipv6: ioam6: use consistent dst names
  net: ipv6: ioam6: fix double reallocation

 net/ipv6/ioam6_iptunnel.c | 76 +++++++++++++++++++++++++++------------
 1 file changed, 54 insertions(+), 22 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org April 17, 2025, 11 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Tue, 15 Apr 2025 13:25:52 +0200 you wrote:
> v2:
> - rephrase misleading comment
> - move BH disable/enable around if condition
> v1:
> - https://lore.kernel.org/netdev/20250410152432.30246-1-justin.iurman@uliege.be/T/#t
> 
> Commit dce525185bc9 ("net: ipv6: ioam6_iptunnel: mitigate 2-realloc
> issue") fixed the double allocation issue in ioam6_iptunnel. However,
> since commit 92191dd10730 ("net: ipv6: fix dst ref loops in rpl, seg6
> and ioam6 lwtunnels"), the fix was left incomplete. Because the cache is
> now empty when the dst_entry is the same post transformation in order to
> avoid a reference loop, the double reallocation is back for such cases
> (e.g., inline mode) which are valid for IOAM. This patch provides a way
> to detect such cases without having a reference loop in the cache, and
> so to avoid the double reallocation issue for all cases again.
> 
> [...]

Here is the summary with links:
  - [net-next,v2,1/2] net: ipv6: ioam6: use consistent dst names
    https://git.kernel.org/netdev/net-next/c/d55acb9732d9
  - [net-next,v2,2/2] net: ipv6: ioam6: fix double reallocation
    https://git.kernel.org/netdev/net-next/c/47ce7c854563

You are awesome, thank you!