Re: [PATCH net-next v3 2/2] tcp: Free TCP-AO/TCP-MD5 info/keys without RCU
From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-09-03 23:27:59
Also in:
lkml
From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-09-03 23:27:59
Also in:
lkml
On Thu, 4 Sep 2025 00:17:34 +0100 Dmitry Safonov wrote:
quoted
quoted
Right. I'll remove tcp_ao_info::rcu in v4. For tcp_ao_key it's needed for the regular key rotation, as well as for tcp_md5sig_key.Hm, maybe I missed something. I did a test allmodconfig build yesterday and while the md5sig_key rcu was still needed, removing the ao_key didn't cause issues. But it was just a quick test I didn't even config kconfig is sane.Hmm, probably CONFIG_TCP_AO was off? tcp_ao_delete_key() does call_rcu(&key->rcu, tcp_ao_key_free_rcu). Looking at the code now, I guess what I could have done even more is migrating tcp_sock::ao_info (and tcp_timewait_sock::ao_info) from rcu_*() helpers to acquire/release ones. Somewhat feeling uneasy about going that far just yet. Should I do it with another cleanup on the top, what do you think?
No preference :)