[lvc-project] [PATCH v2 5.10] net: defer final 'struct net' free in netns dismantle
Hazem Mohamed Abuelfotoh
abuehaze at amazon.com
Mon Jan 27 16:42:48 MSK 2025
I think a better approach will be to backport 41467d2ff4df
("net: net_namespace: Optimize the code") as a prerequisite for
0f6ede9fbc74 ("net: defer final 'struct net' free in netns
dismantle") otherwise we may endup with refcount underflow whenever
"net_free" & "net_drop_ns" called sequentially as with the current
version of the backport both of them apparently call
refcount_dec_and_test(&ns->passive). In 41467d2ff4df
("net: net_namespace: Optimize the code") there are two
hunks that aren't directly related to this backport however
these are removing duplicate code into a separate function
which will likely help with future backports. I have backported
both commits cleanly on 5.10.y and didn't see any issues and I
am currently testing the same on 5.4 as it's also missing both
commits.
More information about the lvc-project
mailing list