* [PATCH net-next 0/2] ipv6: move superseded pcpu dsts to the uncached list
@ 2026-12-04 11:29 Ralf Lici
2026-12-04 11:29 ` [PATCH net-next 1/2] ipv6: base dst ownership on RT6_LOOKUP_F_DST_NOREF only Ralf Lici
2026-12-04 11:29 ` [PATCH net-next 2/2] ipv6: keep a superseded pcpu dst working until its holders notice Ralf Lici
0 siblings, 2 replies; 5+ messages in thread
From: Ralf Lici @ 2026-12-04 11:29 UTC (permalink / raw)
To: netdev
Cc: David Ahern, Ido Schimmel, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Willem de Bruijn, Simon Horman,
linux-kernel, David Ahern, Andrea Mayer, Antonio Quartulli
Hi,
When rt6_get_pcpu_route finds that the per-CPU dst of a route using a
nexthop object is stale, it calls dst_dev_put on it, so the packets of
holders that have not checked it again yet are dropped. IPv4 fixed the
same problem by putting such routes on the uncached list in commits
5018c59607a5 ("ipv4: fix race condition between route lookup and
invalidation") and ae89f2724db1 ("ipv4: route: don't blackhole in-use
routes when retiring fnhe routes").
In IPv6, membership in the uncached list also tells the callers of
RT6_LOOKUP_F_DST_NOREF lookups whether they own a reference, so patch 1
bases the ownership on the flag alone, as Ido suggested [1]. Patch 2,
from David's series [2], then puts the stale dst on the uncached list
and drops the slot's reference after a grace period.
Both are needed by the respin of "ipv6: tie dst validation to the
lookup that returned the dst" [3], which replaces the per-CPU dsts of
all routes this way.
[1] https://lore.kernel.org/netdev/20261202161942.GA2800642@shredder/
[2] https://lore.kernel.org/netdev/20261201174021.7211-3-dsahern@kernel.org/
[3] https://lore.kernel.org/netdev/cover.1795537128.git.ralf@mandelbit.com/
Thanks,
Ralf Lici
Mandelbit Srl
---
Changes to patch 2 since David's v3 [2]:
- Drop the slot's reference after a grace period.
- Drop the comment and the Fixes tag. (Ido)
David Ahern (1):
ipv6: keep a superseded pcpu dst working until its holders notice
Ralf Lici (1):
ipv6: base dst ownership on RT6_LOOKUP_F_DST_NOREF only
include/net/ip6_route.h | 7 ++-----
net/ipv6/route.c | 36 +++++++++++++++++++++++++-----------
net/ipv6/seg6_local.c | 2 +-
3 files changed, 28 insertions(+), 17 deletions(-)
base-commit: 8a3d0368f58e34e34d402718c7655811902a6bd4
--
2.56.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH net-next 1/2] ipv6: base dst ownership on RT6_LOOKUP_F_DST_NOREF only
2026-12-04 11:29 [PATCH net-next 0/2] ipv6: move superseded pcpu dsts to the uncached list Ralf Lici
@ 2026-12-04 11:29 ` Ralf Lici
2026-12-05 12:31 ` netdev-bot+sashiko
2026-12-04 11:29 ` [PATCH net-next 2/2] ipv6: keep a superseded pcpu dst working until its holders notice Ralf Lici
1 sibling, 1 reply; 5+ messages in thread
From: Ralf Lici @ 2026-12-04 11:29 UTC (permalink / raw)
To: netdev
Cc: David Ahern, Ido Schimmel, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Willem de Bruijn, Simon Horman,
linux-kernel, David Ahern, Andrea Mayer, Antonio Quartulli
A lookup with RT6_LOOKUP_F_DST_NOREF returns a dst without a reference,
except for the uncached RTF_CACHE clone of the FLOWI_FLAG_KNOWN_NH path,
whose allocation reference goes to the caller. Callers tell the two
apart by the dst's membership in the uncached list:
ip6_route_output_flags, ip6_rt_put_flags and seg6_lookup_any_nexthop.
That membership cannot mark ownership once a dst returned without a
reference can be moved to the uncached list afterwards, as a replaced
per-CPU dst still in use should be. The caller would then assume a
reference it does not have.
Base ownership on the flag only. A RT6_LOOKUP_F_DST_NOREF caller never
owns a reference, and the allocation reference of an uncached clone is
dropped after a grace period instead, so that the dst stays valid for
the caller's RCU section.
The deferred release reuses dst->rcu_head. The dst only queues it when
its last reference is dropped, which cannot happen while the deferred
reference is still held, and by the time the callback drops that
reference the head is no longer queued.
This is needed to put replaced per-CPU dsts on the uncached list, which
the next patch does for nexthop objects and a later change to dst
validation does for all routes.
Suggested-by: Ido Schimmel <idosch@nvidia.com>
Link: https://lore.kernel.org/netdev/20261202161942.GA2800642@shredder/
Signed-off-by: Ralf Lici <ralf@mandelbit.com>
---
include/net/ip6_route.h | 7 ++-----
net/ipv6/route.c | 32 +++++++++++++++++++++++---------
net/ipv6/seg6_local.c | 2 +-
3 files changed, 26 insertions(+), 15 deletions(-)
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index 95f936be32c6..d5ef35899b34 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -100,13 +100,10 @@ static inline struct dst_entry *ip6_route_output(struct net *net,
return ip6_route_output_flags(net, sk, fl6, 0);
}
-/* Only conditionally release dst if flags indicates
- * !RT6_LOOKUP_F_DST_NOREF or dst is uncached.
- */
+/* Release the dst unless it was looked up with RT6_LOOKUP_F_DST_NOREF */
static inline void ip6_rt_put_flags(struct rt6_info *rt, int flags)
{
- if (!(flags & RT6_LOOKUP_F_DST_NOREF) ||
- rt->dst.rt_uncached_list)
+ if (!(flags & RT6_LOOKUP_F_DST_NOREF))
ip6_rt_put(rt);
}
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index d3c77941d2cf..39bcfa1ce01b 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -147,6 +147,21 @@ void rt6_uncached_list_add(struct rt6_info *rt)
spin_unlock_bh(&ul->lock);
}
+static void rt6_dst_release_rcu(struct rcu_head *head)
+{
+ struct dst_entry *dst = container_of(head, struct dst_entry, rcu_head);
+
+ dst_release(dst);
+}
+
+/* Drop a reference after a grace period, so that RCU readers that found the
+ * dst without one can still use it and take their own.
+ */
+static void rt6_dst_release_deferred(struct rt6_info *rt)
+{
+ call_rcu(&rt->dst.rcu_head, rt6_dst_release_rcu);
+}
+
void rt6_uncached_list_del(struct rt6_info *rt)
{
struct uncached_list *ul = rt->dst.rt_uncached_list;
@@ -2310,12 +2325,14 @@ struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table,
rt = ip6_rt_cache_alloc(&res, &fl6->daddr, NULL);
if (rt) {
- /* 1 refcnt is taken during ip6_rt_cache_alloc().
- * As rt6_uncached_list_add() does not consume refcnt,
- * this refcnt is always returned to the caller even
- * if caller sets RT6_LOOKUP_F_DST_NOREF flag.
- */
rt6_uncached_list_add(rt);
+ /* A RT6_LOOKUP_F_DST_NOREF caller does not inherit the
+ * reference ip6_rt_cache_alloc returned. Dropping it
+ * after a grace period keeps the dst alive for the
+ * caller's RCU section.
+ */
+ if (flags & RT6_LOOKUP_F_DST_NOREF)
+ rt6_dst_release_deferred(rt);
rcu_read_unlock();
return rt;
@@ -2715,13 +2732,10 @@ struct dst_entry *ip6_route_output_flags(struct net *net,
int flags)
{
struct dst_entry *dst;
- struct rt6_info *rt6;
rcu_read_lock();
dst = ip6_route_output_flags_noref(net, sk, fl6, flags);
- rt6 = dst_rt6_info(dst);
- /* For an uncached dst, refcnt is already taken. */
- if (!rt6->dst.rt_uncached_list && !dst_hold_safe(dst)) {
+ if (!dst_hold_safe(dst)) {
dst = &net->ipv6.ip6_null_entry->dst;
dst_hold(dst);
}
diff --git a/net/ipv6/seg6_local.c b/net/ipv6/seg6_local.c
index cd93b72a0b22..a774619221a2 100644
--- a/net/ipv6/seg6_local.c
+++ b/net/ipv6/seg6_local.c
@@ -404,7 +404,7 @@ seg6_lookup_any_nexthop(struct sk_buff *skb, struct in6_addr *nhaddr,
}
skb_dst_drop(skb);
- if ((flags & RT6_LOOKUP_F_DST_NOREF) && !dst->rt_uncached_list)
+ if (flags & RT6_LOOKUP_F_DST_NOREF)
skb_dst_set_noref(skb, dst);
else
skb_dst_set(skb, dst);
--
2.56.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net-next 2/2] ipv6: keep a superseded pcpu dst working until its holders notice
2026-12-04 11:29 [PATCH net-next 0/2] ipv6: move superseded pcpu dsts to the uncached list Ralf Lici
2026-12-04 11:29 ` [PATCH net-next 1/2] ipv6: base dst ownership on RT6_LOOKUP_F_DST_NOREF only Ralf Lici
@ 2026-12-04 11:29 ` Ralf Lici
2026-12-05 12:31 ` netdev-bot+sashiko
1 sibling, 1 reply; 5+ messages in thread
From: Ralf Lici @ 2026-12-04 11:29 UTC (permalink / raw)
To: netdev
Cc: David Ahern, Ido Schimmel, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Willem de Bruijn, Simon Horman,
linux-kernel, David Ahern, Andrea Mayer, Antonio Quartulli
From: David Ahern <dahern@nvidia.com>
When rt6_get_pcpu_route() finds that a pcpu dst of a route using a
nexthop object has been invalidated, it takes the dst out of its slot
and calls dst_dev_put() on it. That points the dst at the blackhole
device and makes its output a discard, although the dst may still be
held: by a socket, a tunnel dst_cache, an xfrm bundle, or an skb that
has not reached dst_output() yet (a queued or NFQUEUE reinjected
packet, async crypto). Those packets are dropped, where the holder
would have noticed that the dst is stale at its next check and looked
the route up again.
The dst does have to be detached from its device when the device is
unregistered: it is no longer reachable from the FIB, and a holder
such as an idle socket can keep it indefinitely, which would hold the
device. Put it on the uncached list instead. It keeps working until its
holders let go, and rt6_uncached_list_flush_dev() detaches it on
unregister like any other uncached dst.
Drop the slot's reference after a grace period too. A lookup with
RT6_LOOKUP_F_DST_NOREF may have taken the dst from the slot without a
reference, and when the only other reference is the child reference of
an xfrm bundle, dst_destroy releases it with dst_release_immediate and
frees the dst under that lookup.
A later change to dst validation replaces the per-CPU dsts of all
routes the same way.
Reported-by: Ralf Lici <ralf@mandelbit.com>
Closes: https://lore.kernel.org/netdev/20261124204623.45969-1-ralf@mandelbit.com/
Signed-off-by: David Ahern <dahern@nvidia.com>
Link: https://lore.kernel.org/netdev/20261201174021.7211-3-dsahern@kernel.org/
[ralf: drop the slot's reference after a grace period, drop the comment
and the Fixes tag]
Signed-off-by: Ralf Lici <ralf@mandelbit.com>
---
net/ipv6/route.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 39bcfa1ce01b..df4d670bcfa6 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1499,8 +1499,8 @@ static struct rt6_info *rt6_get_pcpu_route(const struct fib6_result *res)
/* Paired with READ_ONCE() in __fib6_drop_pcpu_from() */
prev = xchg(p, NULL);
if (prev) {
- dst_dev_put(&prev->dst);
- dst_release(&prev->dst);
+ rt6_uncached_list_add(prev);
+ rt6_dst_release_deferred(prev);
}
pcpu_rt = NULL;
--
2.56.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next 1/2] ipv6: base dst ownership on RT6_LOOKUP_F_DST_NOREF only
2026-12-04 11:29 ` [PATCH net-next 1/2] ipv6: base dst ownership on RT6_LOOKUP_F_DST_NOREF only Ralf Lici
@ 2026-12-05 12:31 ` netdev-bot+sashiko
0 siblings, 0 replies; 5+ messages in thread
From: netdev-bot+sashiko @ 2026-12-05 12:31 UTC (permalink / raw)
To: ralf
Cc: netdev, dsahern, idosch, davem, edumazet, kuba, pabeni, willemb,
horms, linux-kernel, dahern, andrea.mayer, antonio
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] rt6_dst_release_deferred() in net/ipv6/route.c (line 162)
drops the allocation reference of the uncached FLOWI_FLAG_KNOWN_NH…
--
ipv6: base dst ownership on RT6_LOOKUP_F_DST_NOREF only
This commit makes RT6_LOOKUP_F_DST_NOREF the only signal for dst
ownership, instead of membership in the uncached list. For the uncached
FLOWI_FLAG_KNOWN_NH RTF_CACHE clone, ip6_pol_route() no longer hands
the allocation reference to a NOREF caller. That reference is now
dropped after an RCU grace period by a new helper,
rt6_dst_release_deferred().
Link: https://lore.kernel.org/netdev/20261202161942.GA2800642@shredder/
> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index d3c77941d2cf8..39bcfa1ce01b1 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c
> @@ -147,6 +147,21 @@ void rt6_uncached_list_add(struct rt6_info *rt)
> spin_unlock_bh(&ul->lock);
> }
>
> +static void rt6_dst_release_rcu(struct rcu_head *head)
> +{
> + struct dst_entry *dst = container_of(head, struct dst_entry, rcu_head);
> +
> + dst_release(dst);
> +}
> +
> +/* Drop a reference after a grace period, so that RCU readers that found the
> + * dst without one can still use it and take their own.
> + */
> +static void rt6_dst_release_deferred(struct rt6_info *rt)
> +{
> + call_rcu(&rt->dst.rcu_head, rt6_dst_release_rcu);
[Severity: Medium]
Should this be call_rcu_hurry() rather than call_rcu()?
With CONFIG_RCU_LAZY=y on offloaded (rcu_nocbs) CPUs, plain call_rcu()
can leave the callback in the lazy bypass for up to the lazy flush
interval, which is about 10 seconds. The existing last-reference path for
the same object deliberately avoids that:
net/core/dst.c:dst_release() {
...
dst_count_dec(dst);
call_rcu_hurry(&dst->rcu_head, dst_destroy_rcu);
...
}
dst_destroy_rcu can only be queued once the deferred put has run. Every
uncached clone therefore lives for at least two grace periods, and the
first one may be lazy. During that window it still pins rt->from (the
fib6_info and its nexthop), rt6i_idev, the dst->dev reference and the
lwtstate.
> +}
> +
[ ... ]
> @@ -2310,12 +2325,14 @@ struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table,
> rt = ip6_rt_cache_alloc(&res, &fl6->daddr, NULL);
>
> if (rt) {
> - /* 1 refcnt is taken during ip6_rt_cache_alloc().
> - * As rt6_uncached_list_add() does not consume refcnt,
> - * this refcnt is always returned to the caller even
> - * if caller sets RT6_LOOKUP_F_DST_NOREF flag.
> - */
> rt6_uncached_list_add(rt);
> + /* A RT6_LOOKUP_F_DST_NOREF caller does not inherit the
> + * reference ip6_rt_cache_alloc returned. Dropping it
> + * after a grace period keeps the dst alive for the
> + * caller's RCU section.
> + */
> + if (flags & RT6_LOOKUP_F_DST_NOREF)
> + rt6_dst_release_deferred(rt);
This path runs on every KNOWN_NH lookup that allocates a clone. It is
not limited to explicit NOREF callers, because
ip6_route_output_flags_noref() always sets the flag:
flags |= RT6_LOOKUP_F_DST_NOREF;
That means users of the refcounting ip6_route_output() API reach it once
per packet too, through:
ip6_route_output()->ip6_route_output_flags()->
ip6_route_output_flags_noref()->fib6_rule_lookup()->ip6_pol_route()
Those users include raw hdrincl sends, nf_dup_ipv6 (TEE/dup), IPVS
xmit, and seg6local End.X with nh6. Remote traffic can drive several of
them.
> rcu_read_unlock();
>
> return rt;
> @@ -2715,13 +2732,10 @@ struct dst_entry *ip6_route_output_flags(struct net *net,
> int flags)
> {
> struct dst_entry *dst;
> - struct rt6_info *rt6;
>
> rcu_read_lock();
> dst = ip6_route_output_flags_noref(net, sk, fl6, flags);
> - rt6 = dst_rt6_info(dst);
> - /* For an uncached dst, refcnt is already taken. */
> - if (!rt6->dst.rt_uncached_list && !dst_hold_safe(dst)) {
> + if (!dst_hold_safe(dst)) {
Before this patch, these callers inherited the allocation reference. They
paid one dst_release() and one hurried grace period per clone.
They now pay an extra refcount increment and decrement here, plus one
extra RCU callback per packet on top of the final dst_destroy_rcu.
The commit message only says the reference "is dropped after a grace
period instead". Could it also mention this extra per-packet cost for
ip6_route_output() users and explain the choice of call_rcu() over
call_rcu_hurry()?
The later patch in the series, "ipv6: keep a superseded pcpu dst working
until its holders notice", reuses rt6_dst_release_deferred() for replaced
per-CPU dsts and keeps call_rcu(). The issue is therefore still present
at the end of the series.
> dst = &net->ipv6.ip6_null_entry->dst;
> dst_hold(dst);
> }
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/cover.1796382820.git.ralf%40mandelbit.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next 2/2] ipv6: keep a superseded pcpu dst working until its holders notice
2026-12-04 11:29 ` [PATCH net-next 2/2] ipv6: keep a superseded pcpu dst working until its holders notice Ralf Lici
@ 2026-12-05 12:31 ` netdev-bot+sashiko
0 siblings, 0 replies; 5+ messages in thread
From: netdev-bot+sashiko @ 2026-12-05 12:31 UTC (permalink / raw)
To: ralf
Cc: netdev, dsahern, idosch, davem, edumazet, kuba, pabeni, willemb,
horms, linux-kernel, dahern, andrea.mayer, antonio
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.
Critical: 0 · High: 1 · Medium: 1 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [High] The fix is incomplete.
- [Medium] The patch puts a stale nexthop pcpu rt6_info (rt->sernum != 0)
on the uncached list.
--
ipv6: keep a superseded pcpu dst working until its holders notice
This changes rt6_get_pcpu_route() so that an invalidated pcpu dst of a
nexthop-object route is put on the uncached list instead of being
dst_dev_put() when it is taken out of its per-CPU slot. The slot's
reference is now dropped after an RCU grace period, so that
RT6_LOOKUP_F_DST_NOREF readers are not left with a freed dst.
Link: https://lore.kernel.org/netdev/20261201174021.7211-3-dsahern@kernel.org/
> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index 39bcfa1ce01b1..df4d670bcfa60 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c
> @@ -1499,8 +1499,8 @@ static struct rt6_info *rt6_get_pcpu_route(const struct fib6_result *res)
> /* Paired with READ_ONCE() in __fib6_drop_pcpu_from() */
> prev = xchg(p, NULL);
> if (prev) {
> - dst_dev_put(&prev->dst);
> - dst_release(&prev->dst);
> + rt6_uncached_list_add(prev);
> + rt6_dst_release_deferred(prev);
[Severity: High]
The commit message describes two problems with a superseded nexthop pcpu
dst:
1. dst_dev_put() turns a dst that is still held into a discard.
2. The slot reference is dropped without a grace period while
RT6_LOOKUP_F_DST_NOREF readers may still be using the dst.
Is the same pattern still there in fib6_nh_release_dsts()?
net/ipv6/route.c:fib6_nh_release_dsts() {
...
for_each_possible_cpu(cpu) {
...
pcpu_rt = xchg(ppcpu_rt, NULL);
if (pcpu_rt) {
dst_dev_put(&pcpu_rt->dst);
dst_release(&pcpu_rt->dst);
}
}
}
On a group replace, this runs synchronously under RTNL for every IPv6
member of the replaced group:
replace_nexthop()
nh_rt_cache_flush(net, old, new)
fib6_nh_release_dsts(&nhi->fib6_nh)
The member nexthops stay live, so readers on other CPUs can still get to
their pcpu slots. Suppose the dst's references are the slot plus the
child reference of an xfrm bundle B, and B's call_rcu() is already
pending. Can this sequence free the dst under a NOREF reader?
CPU1 CPU0
rcu_read_lock()
ip6_route_input() takes the
pcpu dst NOREF from its slot
fib6_nh_release_dsts()
xchg(ppcpu_rt, NULL)
dst_release() /* 2 -> 1 */
B's grace period ends; it does not
cover CPU1's read section
dst_destroy(B)
dst_release_immediate(child)
/* 1 -> 0, freed */
uses the dst
On a single nexthop replace, replace_nexthop_single() swaps nh_info. Then
nexthop_put(new) reaches this path from an RCU callback:
nexthop_free_single()
fib6_nh_release()
fib6_nh_release_dsts()
The grace period problem doesn't apply there. But wouldn't dsts still
held by sockets, a tunnel dst_cache, xfrm bundles or queued skbs be
blackholed, just as the commit message describes for
rt6_get_pcpu_route()?
A nexthop replace looks like the most direct way for a nexthop pcpu dst
to be superseded. Should fib6_nh_release_dsts() also use the uncached
list and the deferred release?
[Severity: Medium]
Before this change, dst_dev_put() set dst.obsolete to DST_OBSOLETE_DEAD.
Now a pcpu dst with rt->sernum set goes on the uncached list, and its
obsolete stays DST_OBSOLETE_FORCE_CHK.
When the device later goes down or is unregistered,
rt6_uncached_list_flush_dev() does this:
rcu_assign_pointer(rt->dst.dev_rcu, blackhole_netdev);
...
from = unrcu_pointer(xchg(&rt->from, NULL));
fib6_info_release(from);
It does not change obsolete or sernum. ip6_dst_check() then returns early
for dsts that have a sernum:
if (rt->sernum)
return rt6_is_valid(rt) ? dst : NULL;
So the rt->from check, which rejects other flushed uncached dsts, is
never reached.
rt6_is_valid() compares rt->sernum against
rt_genid_ipv6(dev_net(rt->dst.dev)). After the flush that is init_net,
because blackhole_netdev lives there. For a route in a non-init netns,
ip6_rt_pcpu_alloc() took rt->sernum from the original netns. Every netns
counter starts at 1 and goes up by one per FIB change.
Can the stale sernum equal init_net's current fib6_sernum? If so, would
ip6_dst_check() accept the blackholed dst? The socket, tunnel dst_cache
or xfrm bundle holding it would then keep sending into blackhole_netdev
until init_net's fib6_sernum changes.
The commit message says rt6_uncached_list_flush_dev() detaches the dst
"like any other uncached dst", but other uncached dsts have a zero
sernum. Does the flush path, or the move to the uncached list, need to
clear rt->sernum or mark the dst DST_OBSOLETE_DEAD?
> }
>
> pcpu_rt = NULL;
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/cover.1796382820.git.ralf%40mandelbit.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-12-05 12:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 11:29 [PATCH net-next 0/2] ipv6: move superseded pcpu dsts to the uncached list Ralf Lici
2026-12-04 11:29 ` [PATCH net-next 1/2] ipv6: base dst ownership on RT6_LOOKUP_F_DST_NOREF only Ralf Lici
2026-12-05 12:31 ` netdev-bot+sashiko
2026-12-04 11:29 ` [PATCH net-next 2/2] ipv6: keep a superseded pcpu dst working until its holders notice Ralf Lici
2026-12-05 12:31 ` netdev-bot+sashiko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox