From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: "Ionut Nechita (Wind River)" <ionut.nechita@windriver.com>,
<intel-wired-lan@lists.osuosl.org>, <anthony.l.nguyen@intel.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<larysa.zaremba@intel.com>, <maciej.fijalkowski@intel.com>,
<jacob.e.keller@intel.com>, <wojciech.drewek@intel.com>,
<andrew+netdev@lunn.ch>, <davem@davemloft.net>,
<edumazet@kernel.org>, <kuba@kernel.org>, <pabeni@redhat.com>,
<poros@redhat.com>
Subject: Re: [PATCH iwl-net v2] ice: release IRQs and rings in ice_dis_vsi() when the VSI is already down
Date: Thu, 26 Nov 2026 05:38:52 +0100 [thread overview]
Message-ID: <776edf32-c9d3-44ad-87a0-0fc2c4861ea4@intel.com> (raw)
In-Reply-To: <20261125152850.16261-1-ionut.nechita@windriver.com>
On 11/25/26 4:28 PM, Ionut Nechita (Wind River) wrote:
> On 11/25/26 11:51 AM, Przemek Kitszel wrote:
>> I've run your patch through our local sashiko instance, and it reports
>> that your patch adds new problems on edge cases. The same issues were
>> reported both on your patch just on top of netdev/main and
>> tony/dev-queue+some more fixes (meaning those problems are not "already
>> resolved elsewhere"). For the first issue (DCB) both my and Petr Oros
>> patches were applied (not yet on netdev main (aka -net)).
>
> Hi Przemek,
>
> Thank you for running it and for sharing the report.
>
>> [Severity: High]
>> Can this free DMA memory that enabled hardware queues still own?
>
> Yes, this is right, and it makes the patch worse than the problem it
> fixes. If ice_up_complete() fails in ice_vsi_start_all_rx_rings(), it
> returns with ICE_VSI_DOWN still set, while the Tx queues are enabled by
> FW and the Rx queues may be enabled with buffers posted. Today that
> memory is leaked but stays allocated and mapped; with my patch
> ice_vsi_close() frees it without stopping the queues first, so the
> device could DMA into freed memory. Pointing to ice_stop() as the
> precedent was wrong, since it has the same hazard.
>
>> [Severity: Medium]
>> Can this now reach a NULL vsi->q_vectors?
>
> Also right. ice_vsi_free_arrays() sets q_vectors to NULL but leaves
> num_q_vectors as is, and ice_vsi_clear_napi_queues() does not check
> q_vectors, so the already_down check was hiding this after a failed
> ice_vsi_rebuild(). My statement that ice_vsi_close() already handles
> a VSI that is down only holds for the IRQs and the rings.
>
>> [Severity: Medium]
>> Does removing the already_down check widen races with code that brings
>> the VSI down without rtnl_lock?
>
> Agreed that it widens the window, so the reasoning in the commit
> message that ICE_VSI_DOWN is still tested under rtnl_lock is not
> enough to show it is safe.
>
> So please drop v2. The underlying problem is that a failed ice_up() /
> ice_down_up() leaves the VSI half up, and ice_dis_vsi() cannot tell
> whether the queues are still enabled, so it is not the right place to
> clean this up. If I come back to it, it will be a fix on those error
> paths, tested on hardware rather than build only.
>
> Could you point me to your and Petr's patches for the DCB path? I would
Petr's:
https://lore.kernel.org/intel-wired-lan/20261113161453.1234851-1-poros@redhat.com
but we are expecting v4
mine is linked there, but for your convenience:
https://lore.kernel.org/all/20261102105346.30739-1-przemyslaw.kitszel@intel.com
> like to check whether they also cover the case I originally hit with
> the out-of-tree driver (ice_vsi_cfg_lan() failing on an E830 port
> without a module installed).
>
> Separately, the NULL q_vectors with a non-zero num_q_vectors after a
> failed rebuild looks reachable through ice_stop() already, independent
> of this patch. If you think it is worth it, I can send a small fix for
> that once I have reproduced it.
would be great!
In general we have many little bugs on all the error/unroll/reset paths,
especially if they intersect. Sometimes its hard to fix even an obvious
problem w/o making one of those unlikely paths slightly worse, but that
is the new quality bar we strive to achieve ;)
So, if you will be able to cut off any of the problems, it would be
great, and it is likely to be easiest starting at the bottom (at leaf
nodes of the bug-tree).
>
> Thanks,
> Ionut
prev parent reply other threads:[~2026-11-26 4:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 8:35 [PATCH iwl-net v2] ice: release IRQs and rings in ice_dis_vsi() when the VSI is already down Ionut Nechita (Wind River)
2026-11-25 10:51 ` Przemek Kitszel
2026-11-25 15:28 ` Ionut Nechita (Wind River)
2026-11-26 4:38 ` Przemek Kitszel [this message]
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=776edf32-c9d3-44ad-87a0-0fc2c4861ea4@intel.com \
--to=przemyslaw.kitszel@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=ionut.nechita@windriver.com \
--cc=jacob.e.keller@intel.com \
--cc=kuba@kernel.org \
--cc=larysa.zaremba@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=poros@redhat.com \
--cc=wojciech.drewek@intel.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