[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250127134248.25731-1-abuehaze@amazon.com>
Date: Mon, 27 Jan 2025 13:42:48 +0000
From: Hazem Mohamed Abuelfotoh <abuehaze@...zon.com>
To: <kovalev@...linux.org>
CC: <edumazet@...gle.com>, <i.maximets@....org>, <kuba@...nel.org>,
<kuniyu@...zon.com>, <lvc-project@...uxtesting.org>,
<netdev@...r.kernel.org>, <pabeni@...hat.com>, <stable@...r.kernel.org>
Subject: [PATCH v2 5.10] net: defer final 'struct net' free in netns dismantle
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.
Powered by blists - more mailing lists