Re: Namespaced network devices not cleaned up properly after execution of pmtu.sh kernel selftest

From: Eric Dumazet
Date: Mon Sep 23 2024 - 16:14:34 EST


On Mon, Sep 23, 2024 at 10:01 PM Mitchell Augustin
<mitchell.augustin@xxxxxxxxxxxxx> wrote:
>
> Hi!
>
> I'm wondering if anyone has taken a look at my reproducer yet. I'd
> love to know if it has helped any of you reproduce the bug more
> easily.
>
> Patch w/ reproducer:
> https://lore.kernel.org/all/20240916191857.1082092-1-mitchell.augustin@xxxxxxxxxxxxx/
>

As I said before, we were aware of this issue, well before your report.

We have no efficient fix yet.
https://lore.kernel.org/netdev/202405311808.vqBTwxEf-lkp@xxxxxxxxx/T/

You can disable dst_cache, this should remove the issue.

diff --git a/net/core/dst_cache.c b/net/core/dst_cache.c
index 70c634b9e7b02300188582a1634d5977838db132..53351ff58b35dbee37ff587f7ef8f72580d9e116
100644
--- a/net/core/dst_cache.c
+++ b/net/core/dst_cache.c
@@ -142,12 +142,7 @@ EXPORT_SYMBOL_GPL(dst_cache_get_ip6);

int dst_cache_init(struct dst_cache *dst_cache, gfp_t gfp)
{
- dst_cache->cache = alloc_percpu_gfp(struct dst_cache_pcpu,
- gfp | __GFP_ZERO);
- if (!dst_cache->cache)
- return -ENOMEM;
-
- dst_cache_reset(dst_cache);
+ dst_cache->cache = NULL;
return 0;
}
EXPORT_SYMBOL_GPL(dst_cache_init);