All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Dmitry Safonov via B4 Relay <devnull+0x7f454c46.gmail.com@kernel.org>
Cc: 0x7f454c46@gmail.com, Eric Dumazet <edumazet@google.com>,
	"David S. Miller" <davem@davemloft.net>,
	David Ahern <dsahern@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@kernel.org
Subject: Re: [PATCH net] net/tcp: Disable TCP-AO static key after RCU grace period
Date: Fri, 26 Jul 2024 19:34:03 -0700	[thread overview]
Message-ID: <20240726193403.1b15a2af@kernel.org> (raw)
In-Reply-To: <20240725-tcp-ao-static-branch-rcu-v1-1-021d009beebf@gmail.com>

On Thu, 25 Jul 2024 06:00:02 +0100 Dmitry Safonov via B4 Relay wrote:
> @@ -290,9 +298,7 @@ void tcp_ao_destroy_sock(struct sock *sk, bool twsk)
>  			atomic_sub(tcp_ao_sizeof_key(key), &sk->sk_omem_alloc);
>  		call_rcu(&key->rcu, tcp_ao_key_free_rcu);
>  	}
> -
> -	kfree_rcu(ao, rcu);
> -	static_branch_slow_dec_deferred(&tcp_ao_needed);
> +	call_rcu(&ao->rcu, tcp_ao_info_free_rcu);

Maybe free the keys inside tcp_ao_info_free_rcu, too?
IIUC you're saying that new sock is still looking at this ao under RCU
protection - messing with the key list feels a tiny bit odd since the
object is technically "live" until the end of the RCU grace period.

  parent reply	other threads:[~2024-07-27  2:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-25  5:00 [PATCH net] net/tcp: Disable TCP-AO static key after RCU grace period Dmitry Safonov
2024-07-25  5:00 ` Dmitry Safonov via B4 Relay
2024-07-25  7:47 ` Eric Dumazet
2024-07-25  8:50   ` Dmitry Safonov
2024-07-27  2:34 ` Jakub Kicinski [this message]
2024-07-27 18:30   ` Dmitry Safonov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240726193403.1b15a2af@kernel.org \
    --to=kuba@kernel.org \
    --cc=0x7f454c46@gmail.com \
    --cc=davem@davemloft.net \
    --cc=devnull+0x7f454c46.gmail.com@kernel.org \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stable@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.