From: Jakub Kicinski <kuba@kernel.org>
To: "Tantilov, Emil S" <emil.s.tantilov@intel.com>
Cc: Jacob Keller <jacob.e.keller@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
"Pavan Kumar Linga" <pavan.kumar.linga@intel.com>,
Alexander Lobakin <aleksander.lobakin@intel.com>,
Willem de Bruijn <willemb@google.com>,
Sridhar Samudrala <sridhar.samudrala@intel.com>,
Phani Burra <phani.r.burra@intel.com>,
Piotr Kwapulinski <piotr.kwapulinski@intel.com>,
Simon Horman <horms@kernel.org>,
Radoslaw Tyl <radoslawx.tyl@intel.com>,
Jedrzej Jagielski <jedrzej.jagielski@intel.com>,
Mateusz Polchlopek <mateusz.polchlopek@intel.com>,
Anton Nadezhdin <anton.nadezhdin@intel.com>,
Konstantin Ilichev <konstantin.ilichev@intel.com>,
Milena Olech <milena.olech@intel.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
Joshua Hay <joshua.a.hay@intel.com>,
Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
Chittim Madhu <madhu.chittim@intel.com>,
Samuel Salin <Samuel.salin@intel.com>
Subject: Re: [PATCH net 3/8] idpf: fix possible race in idpf_vport_stop()
Date: Mon, 6 Oct 2025 10:26:59 -0700 [thread overview]
Message-ID: <20251006102659.595825fe@kernel.org> (raw)
In-Reply-To: <4a128348-48f9-40d7-b5bf-c3f1af27679c@intel.com>
On Mon, 6 Oct 2025 07:49:32 -0700 Tantilov, Emil S wrote:
> > Argh, please stop using the flag based state machines. They CANNOT
> > replace locking. If there was proper locking in place it wouldn't
> > have mattered when we clear the flag.
>
> This patch is resolving a bug in the current logic of how the flag is
> used (not being atomic and not being cleared properly). I don't think
> there is an existing lock in place to address this issue, though we are
> looking to refactor the code over time to remove and/or limit how these
> flags are used.
Can you share more details about the race? If there is no lock in place
there's always the risk that:
CPU 0 CPU 1
idpf_vport_stop() whatever()
if (test_bit(UP))
# sees true
# !< long IRQ arrives
test_and_clear(UP)
...
all the rest
...
# > long IRQ ends
proceed but UP isn't really set any more
next prev parent reply other threads:[~2025-10-06 17:27 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-02 0:14 [PATCH net 0/8] Intel Wired LAN Driver Updates 2025-10-01 (idpf, ixgbe, ixgbevf) Jacob Keller
2025-10-02 0:14 ` [PATCH net 1/8] idpf: cleanup remaining SKBs in PTP flows Jacob Keller
2025-10-02 0:14 ` [PATCH net 2/8] idpf: convert vport state to bitmap Jacob Keller
2025-10-02 0:14 ` [PATCH net 3/8] idpf: fix possible race in idpf_vport_stop() Jacob Keller
2025-10-03 17:43 ` Jakub Kicinski
2025-10-06 14:49 ` Tantilov, Emil S
2025-10-06 17:26 ` Jakub Kicinski [this message]
2025-10-07 0:07 ` Tantilov, Emil S
2025-10-08 21:41 ` Jacob Keller
2025-10-13 18:13 ` Jakub Kicinski
2025-10-22 22:49 ` Tantilov, Emil S
2025-10-02 0:14 ` [PATCH net 4/8] ixgbevf: fix getting link speed data for E610 devices Jacob Keller
2025-10-02 0:14 ` [PATCH net 5/8] ixgbe: handle IXGBE_VF_GET_PF_LINK_STATE mailbox operation Jacob Keller
2025-10-02 0:14 ` [PATCH net 6/8] ixgbevf: fix mailbox API compatibility by negotiating supported features Jacob Keller
2025-10-02 0:14 ` [PATCH net 7/8] ixgbe: handle IXGBE_VF_FEATURES_NEGOTIATE mbox cmd Jacob Keller
2025-10-02 0:14 ` [PATCH net 8/8] ixgbe: fix too early devlink_free() in ixgbe_remove() Jacob Keller
2025-10-03 17:42 ` [PATCH net 0/8] Intel Wired LAN Driver Updates 2025-10-01 (idpf, ixgbe, ixgbevf) Jakub Kicinski
2025-10-04 0:58 ` Jacob Keller
2025-10-06 15:27 ` Alexander Lobakin
2025-10-06 21:59 ` Jacob Keller
2025-10-06 23:58 ` Jacob Keller
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=20251006102659.595825fe@kernel.org \
--to=kuba@kernel.org \
--cc=Samuel.salin@intel.com \
--cc=aleksander.lobakin@intel.com \
--cc=aleksandr.loktionov@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=anton.nadezhdin@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=emil.s.tantilov@intel.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=jedrzej.jagielski@intel.com \
--cc=joshua.a.hay@intel.com \
--cc=konstantin.ilichev@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=madhu.chittim@intel.com \
--cc=mateusz.polchlopek@intel.com \
--cc=milena.olech@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavan.kumar.linga@intel.com \
--cc=phani.r.burra@intel.com \
--cc=piotr.kwapulinski@intel.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=radoslawx.tyl@intel.com \
--cc=sridhar.samudrala@intel.com \
--cc=willemb@google.com \
/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;
as well as URLs for NNTP newsgroup(s).