[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGrbwDQVeE=-gVNQhWZ_YqsMRTX=2B49O7k3j-FjVHCLrTWUnQ@mail.gmail.com>
Date: Thu, 4 Sep 2025 00:22:47 +0100
From: Dmitry Safonov <dima@...sta.com>
To: Kuniyuki Iwashima <kuniyu@...gle.com>
Cc: Eric Dumazet <edumazet@...gle.com>, Neal Cardwell <ncardwell@...gle.com>,
"David S. Miller" <davem@...emloft.net>, David Ahern <dsahern@...nel.org>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>,
Bob Gilligan <gilligan@...sta.com>, Salam Noureddine <noureddine@...sta.com>,
Dmitry Safonov <0x7f454c46@...il.com>, netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v4 2/2] tcp: Free TCP-AO/TCP-MD5 info/keys
without RCU
On Wed, Sep 3, 2025 at 10:26 PM Kuniyuki Iwashima <kuniyu@...gle.com> wrote:
>
> On Wed, Sep 3, 2025 at 1:30 PM Dmitry Safonov via B4 Relay
> <devnull+dima.arista.com@...nel.org> wrote:
> >
> > From: Dmitry Safonov <dima@...sta.com>
> >
> > Now that the destruction of info/keys is delayed until the socket
> > destructor, it's safe to use kfree() without an RCU callback.
> > As either socket was yet in TCP_CLOSE state or the socket refcounter is
>
> Why either ? Maybe I'm missing but is there a path where
> ->unhash() is called without changing the state to TCP_CLOSE ?
Well, I meant "either" like in "*yet* in TCP_CLOSE or *already* there
(being destroyed)". Let me rephrase that as I'm going to send v5 with
your suggestions for Patch1.
> > zero and no one can discover it anymore, it's safe to release memory
> > straight away.
> > Similar thing was possible for twsk already.
> >
> > Signed-off-by: Dmitry Safonov <dima@...sta.com>
>
> Change itself looks good.
>
> Reviewed-by: Kuniyuki Iwashima <kuniyu@...gle.com>
Thanks,
Dmitry
Powered by blists - more mailing lists