From: Antonio Quartulli <antonio@openvpn.net>
To: Jakub Kicinski <kuba@kernel.org>, Sabrina Dubroca <sd@queasysnail.net>
Cc: netdev@vger.kernel.org, Ralf Lici <ralf@mandelbit.com>,
Paolo Abeni <pabeni@redhat.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Hyunwoo Kim <imv4bel@gmail.com>
Subject: Re: [PATCH net 1/1] ovpn: fix race between deleting interface and adding new peer
Date: Thu, 23 Apr 2026 15:43:31 +0200 [thread overview]
Message-ID: <9221605c-ad31-44f9-b3b7-db2237f75eb7@openvpn.net> (raw)
In-Reply-To: <7481bc31-44f6-43ae-b3aa-07002644d9e6@openvpn.net>
On 23/04/2026 14:16, Antonio Quartulli wrote:
> On 23/04/2026 04:20, Jakub Kicinski wrote:
>> On Wed, 22 Apr 2026 14:32:42 +0200 Antonio Quartulli wrote:
>>> + /* Prevent adding new peers while destroying the ovpn interface.
>>> + * Failing to do so would end up holding the device reference
>>> + * endlessly hostage of the new peer object with no chance of
>>> + * release..
>>> + */
>>> + if (ovpn->dev->reg_state >= NETREG_UNREGISTERING)
>>> + return -ENODEV;
>>
>> AI review suggests wrapping reg_state read in READ_ONCE(), I think
>> that's legit. Also nit: I think > or != REGISTERED would be more
>> idiomatic than comparing >= UNREGSITERING ?
>
> Agreed on READ_ONCE. Will fix it.
>
> As for your second point, I am fine with "!= REGISTERED" as that's the
> only state we should be accepting new peers in any case.
>
>>
>> If you agree make sure Sashiko doesn't complain about anything else
>> once it's public:
>> https://sashiko.dev/#/patchset/20260422123242.530882-2-
>> antonio@openvpn.net
>
> Is there any way to get earlier access to these reviews? (at least for
> patches somehow related to me/ovpn)
>
Dang! sashiko reminded me that I should swap cancel_delayed_work_sync
with disable_delayed_work_sync. Will fix that.
As for the second remarks..It has convincing arguments, but I need some
more time to think about it.
Sabrina, do you have an opinion?
Cheers,
>
> Thanks!
> Regards,
>
--
Antonio Quartulli
OpenVPN Inc.
next prev parent reply other threads:[~2026-04-23 13:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-22 12:32 [PATCH net 0/1] pull request: fixes for ovpn 2026-04-22 Antonio Quartulli
2026-04-22 12:32 ` [PATCH net 1/1] ovpn: fix race between deleting interface and adding new peer Antonio Quartulli
2026-04-23 2:20 ` Jakub Kicinski
2026-04-23 12:16 ` Antonio Quartulli
2026-04-23 13:43 ` Antonio Quartulli [this message]
2026-04-23 16:37 ` Sabrina Dubroca
-- strict thread matches above, loose matches on Subject: below --
2026-03-20 10:03 [PATCH net 0/1] pull request: fixes for ovpn 2026-03-20 Antonio Quartulli
2026-03-20 10:03 ` [PATCH net 1/1] ovpn: fix race between deleting interface and adding new peer Antonio Quartulli
2026-03-24 1:43 ` Jakub Kicinski
2026-03-24 1:45 ` Jakub Kicinski
2026-03-24 10:09 ` Sabrina Dubroca
2026-03-24 21:30 ` Jakub Kicinski
2026-03-24 22:40 ` Sabrina Dubroca
2026-03-25 13:37 ` Antonio Quartulli
2026-03-26 9:13 ` Sabrina Dubroca
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=9221605c-ad31-44f9-b3b7-db2237f75eb7@openvpn.net \
--to=antonio@openvpn.net \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=imv4bel@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ralf@mandelbit.com \
--cc=sd@queasysnail.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox