From: sashiko-bot@kernel.org
To: "Petr Oros" <poros@redhat.com>
Cc: intel-wired-lan@lists.osuosl.org
Subject: Re: [PATCH net v7 1/4] ice: stop the service task before the PF is unloaded
Date: Thu, 03 Dec 2026 07:17:45 +0000 [thread overview]
Message-ID: <sashiko-outbox-247274@kernel.org> (raw)
In-Reply-To: <20261202071642.2527605-2-poros@redhat.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] ice: clear_bit(ICE_SERVICE_SCHED) before disable_work_sync() in
shutdown
--
commit 48baf63ed8e1c70522d51d9b9db9d607dcfc0c36
Author: Petr Oros <poros@redhat.com>
ice: stop the service task before the PF is unloaded
This commit adds ice_service_task_shutdown() to permanently stop the
service work and timer, and calls it alongside ice_aq_cancel_waiting_tasks()
after ice_free_vfs() in ice_remove().
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> index 47c6798c97e8f..b05eda1bf50ae 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -1707,6 +1707,22 @@ static int ice_service_task_stop(struct ice_pf *pf)
> return ret;
> }
>
> +/**
> + * ice_service_task_shutdown - stop the service task for PF removal
> + * @pf: board private structure
> + *
> + * A caller that passed the ICE_SERVICE_DIS test before the stop can
> + * still queue the work after it, and a run in progress can arm the
> + * timer after its delete. The PF is going away, so make both
> + * permanently dead, nothing restarts them.
> + */
> +static void ice_service_task_shutdown(struct ice_pf *pf)
> +{
> + ice_service_task_stop(pf);
> + disable_work_sync(&pf->serv_task);
> + timer_shutdown_sync(&pf->serv_tmr);
> +}
[Severity: Low]
Can calling ice_service_task_stop() before disable_work_sync() trigger
WARN_ON(!test_bit(ICE_SERVICE_SCHED, pf->state)) in
ice_service_task_complete()?
ice_service_task_stop() runs cancel_work_sync(&pf->serv_task), which
leaves pf->serv_task enabled on return, and then clears ICE_SERVICE_SCHED
before disable_work_sync() disables the work item:
CPU0 CPU1
ice_service_task_shutdown() ice_service_task_schedule()
!test_bit(ICE_SERVICE_DIS, ...)
!test_and_set_bit(ICE_SERVICE_SCHED, ...)
ice_service_task_stop()
test_and_set_bit(ICE_SERVICE_DIS, ...)
cancel_work_sync(&pf->serv_task)
clear_bit(ICE_SERVICE_SCHED, ...)
queue_work(ice_wq, &pf->serv_task)
ice_service_task()
ice_service_task_complete()
WARN_ON(!test_bit(ICE_SERVICE_SCHED, ...))
disable_work_sync(&pf->serv_task)
Setting ICE_SERVICE_DIS, running timer_shutdown_sync(&pf->serv_tmr) and
disable_work_sync(&pf->serv_task), and only clearing ICE_SERVICE_SCHED
afterward would close this window.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261202071642.2527605-1-poros@redhat.com?part=1
next prev parent reply other threads:[~2026-12-03 7:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 7:16 [PATCH net v7 0/4] ice: fix DFLT Rx rule handling for promisc and switchdev Petr Oros
2026-12-02 7:16 ` [PATCH net v7 1/4] ice: stop the service task before the PF is unloaded Petr Oros
2026-12-03 7:17 ` sashiko-bot [this message]
2026-12-03 8:01 ` netdev-bot+sashiko
2026-12-03 10:55 ` Ivan Vecera
2026-12-02 7:16 ` [PATCH net v7 2/4] ice: do not leave switchdev mode while subfunction ports exist Petr Oros
2026-12-03 8:01 ` netdev-bot+sashiko
2026-12-03 10:56 ` Ivan Vecera
2026-12-02 7:16 ` [PATCH net v7 3/4] ice: resync uplink filters after a switchdev session Petr Oros
2026-12-03 8:01 ` netdev-bot+sashiko
2026-12-03 9:51 ` Petr Oros
2026-12-03 10:56 ` Ivan Vecera
2026-12-02 7:16 ` [PATCH net v7 4/4] ice: use a VLAN agnostic multicast promisc rule pair for PF VSIs Petr Oros
2026-12-03 10:57 ` Ivan Vecera
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=sashiko-outbox-247274@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=poros@redhat.com \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.