netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Jacob Keller <jacob.e.keller@intel.com>
Cc: 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>,
	Emil Tantilov <emil.s.tantilov@intel.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: Fri, 3 Oct 2025 10:43:32 -0700	[thread overview]
Message-ID: <20251003104332.40581946@kernel.org> (raw)
In-Reply-To: <20251001-jk-iwl-net-2025-10-01-v1-3-49fa99e86600@intel.com>

On Wed, 01 Oct 2025 17:14:13 -0700 Jacob Keller wrote:
> From: Emil Tantilov <emil.s.tantilov@intel.com>
> 
> Make sure to clear the IDPF_VPORT_UP bit on entry. The idpf_vport_stop()
> function is void and once called, the vport teardown is guaranteed to
> happen. Previously the bit was cleared at the end of the function, which
> opened it up to possible races with all instances in the driver where
> operations were conditional on this bit being set. For example, on rmmod
> callbacks in the middle of idpf_vport_stop() end up attempting to remove
> MAC address filter already removed by the function:
> idpf 0000:83:00.0: Received invalid MAC filter payload (op 536) (len 0)

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.

I'm guessing false negatives are okay in how you use the UP flag? 
The commit message doesn't really explain why.

  reply	other threads:[~2025-10-03 17:43 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 [this message]
2025-10-06 14:49     ` Tantilov, Emil S
2025-10-06 17:26       ` Jakub Kicinski
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=20251003104332.40581946@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).