mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: Tony Nguyen <anthony.l.nguyen@intel.com>,
	Linkui Xiao <xiaolinkui@126.com>
Cc: <andrew+netdev@lunn.ch>, <davem@davemloft.net>,
	<edumazet@google.com>, <kuba@kernel.org>,
	<netdev-bot+sinfo@kernel.org>, <pabeni@redhat.com>,
	<intel-wired-lan@lists.osuosl.org>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Linkui Xiao <xiaolinkui@kylinos.cn>, <stable@vger.kernel.org>
Subject: Re: [PATCH iwl-net v2 1/2] ice: detach the VF representor when ice_start_vfs() fails
Date: Wed, 7 Oct 2026 13:11:56 +0200	[thread overview]
Message-ID: <0c464819-16ee-4bae-b15c-3337516ef3c9@intel.com> (raw)
In-Reply-To: <547ed917-77fc-4670-974c-4d4fd6fbf3e7@intel.com>

On 9/29/26 8:11 PM, Tony Nguyen wrote:
> 
> 
> On 9/28/2026 12:14 AM, Linkui Xiao wrote:
>> Hi,
>>
>> Thanks for the review. Please find the missing information below.
>>
>> - How the issue was discovered:
>>    Found during manual code inspection of the ice VF setup/teardown 
>> error paths. It was not reported by syzbot, a static analysis tool, or 
>> an LLM scan, and was not hit in production.
>>
>> - Whether the issue was actually triggered:
>>    Not actually triggered. It is a theoretical error-path cleanup 
>> issue found by inspection; no stack trace or error message was observed.
>>
>> - Hardware tested:
>>    Not tested on real hardware. The change was only compile-tested; no 
>> affected Intel NIC/firmware test was performed.
>>
>> The same applies to patch 2/2: it was also found by the same manual 
>> code inspection, was not triggered at runtime, and was only compile- 
>> tested, not tested on real hardware.
>>
>> If a v3 is needed for other review reasons, I will include this 
>> information in the commit messages.
>>
>> Thanks,
>> Linkui Xiao
>>
>> On 2026/9/28 14:59, netdev-bot+sinfo@kernel.org wrote:
>>> Hi!
>>>
>>> This is an automated message. This series looks like a fix, but its
>>> commit messages seem to be missing some information:
>>>
>>>   - How the issue was discovered, e.g. hit in production, hit during
>>>     development, syzbot report, manual code inspection, LLM or static
>>>     analysis tool scan.
>>>
>>>   - Whether the issue was actually triggered, or is only theoretical
>>>     (e.g. found by code inspection). If it was triggered please include
>>>     the symptoms, like the stack trace or error messages.
>>>
>>>   - What hardware the change was tested on. For driver fixes please
>>>     mention the device (and if relevant firmware version) used for
>>>     testing, or say that the change was not tested on real hardware.
>>>
>>> Please do not repost the series just to address the above. Instead,
>>> reply to this email with the missing information, so that reviewers
>>> can take it into account. If the series needs another revision for
>>> other reasons, please include the information in the commit messages
>>> then.
> 
> Hi Jakub,
> 
> For patches that go through iwl-net, how did you want this handled? It 
> says to not repost just to address the above, but since this will get 
> submitted later, did you want the commit updated to make the latter 
> check happy, did you want me to copy/paste the response to the commit, 
> or something else?

In general, I would say it's up to you Tony.
Perhaps we could decide based on the amount of additional changes.

For this particular patch sashiko already posted complains:
https://sashiko.dev/#/patchset/20260928065306.1514795-1-xiaolinkui%40126.com?part=1

I've encountered the same problem (although during my OOT encounters),
and the solution is to detach/attach VF representors outside of
vf->cfg_lock. More rationale by AI follows:

ice_reset_all_vfs() and ice_free_vfs() call ice_eswitch_detach() and
ice_eswitch_attach() with vf->cfg_lock held. Both take the devlink
instance lock and then register or unregister the representor netdev,
which takes RTNL. ndo_set_vf_mac(), ndo_set_vf_vlan() and the
representor's ethtool reset take vf->cfg_lock under RTNL, so the order
is inverted. The ice_check_vf_ready_for_cfg() check in those callers
runs before vf->cfg_lock is taken, so it doesn't keep them away from a
reset that is already in progress.

Detach before taking vf->cfg_lock and attach after releasing it.
Representors are added and removed only under pf->vfs.table_lock, and
ice_start_vfs() already attaches without vf->cfg_lock. Both functions
set ICE_VF_DIS first, so a concurrent ice_reset_vf() bails out before it
reaches ice_eswitch_update_repr().

  reply	other threads:[~2026-10-07 11:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28  6:53 Linkui Xiao
2026-09-28  6:53 ` [PATCH iwl-net v2 2/2] ice: release the VF MSI-X window " Linkui Xiao
2026-09-28 13:08   ` Tomasz Lichwala
2026-09-29  0:55     ` Linkui Xiao
2026-09-28 15:16   ` Loktionov, Aleksandr
2026-09-28  6:59 ` [PATCH iwl-net v2 1/2] ice: detach the VF representor " netdev-bot+sinfo
2026-09-28  7:14   ` Linkui Xiao
2026-09-29 18:11     ` Tony Nguyen
2026-10-07 11:11       ` Przemek Kitszel [this message]
2026-09-28 13:08 ` Tomasz Lichwala
2026-09-28 15:16 ` Loktionov, Aleksandr

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=0c464819-16ee-4bae-b15c-3337516ef3c9@intel.com \
    --to=przemyslaw.kitszel@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev-bot+sinfo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=xiaolinkui@126.com \
    --cc=xiaolinkui@kylinos.cn \
    /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

all inboxes | Powered by JetHome®