Linux virtualization list
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Congjie Zhou" <zcjie0802@qq.com>
Cc: virtualization@lists.linux.dev,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH net 2/2] virtio_net: mask callbacks before releasing NAPI ownership
Date: Thu, 12 Nov 2026 13:52:17 +0000	[thread overview]
Message-ID: <sashiko-outbox-211234@kernel.org> (raw)
In-Reply-To: <tencent_3206E4502773D7AC6F720CF4046674E5A809@qq.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] virtio_net: missing Fixes trailer for virtqueue_napi_complete()
  race fix
--

commit c4014f837fc88f44df9c4728b3bea8a252b5c2fb
Author: Congjie Zhou <zcjie0802@qq.com>

> virtio_net: mask callbacks before releasing NAPI ownership
>
> virtqueue_napi_complete() prepares callbacks before calling
> napi_complete_done(), then disables them if completion returns false.
> On the hard IRQ deferral path, completion can release NAPI ownership
> and arm the watchdog before returning false.
>
> A successor poll can rearm callbacks and complete before the old caller
> executes virtqueue_disable_cb(). The stale mask then disables
> notifications again. If the one-shot watchdog has already run, no NAPI
> owner or timer remains to consume later used entries, causing a
> persistent RX stall.
>
> Use napi_complete_done_with_irq_mask() to disable callbacks before
> completion can hand NAPI to a successor, and remove the stale mask after
> a false return. Keep virtqueue_enable_cb_prepare() before completion:
> moving it after ownership release would reintroduce the RX virtqueue
> race fixed by commit cbdadbbf0c79 ("virtio_net: fix race in RX VQ
> processing").
>
> Signed-off-by: Congjie Zhou <zcjie0802@qq.com>

[Severity: Low]
This fixes a persistent RX stall race in virtqueue_napi_complete().
Should it include a Fixes tag for the post-completion virtqueue_disable_cb()
call?

  Fixes: fdaa767aefc1 ("virtio_net: Disable interrupts if napi_complete_done rescheduled napi")

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/tencent_74EA7A2E8BF5758E9C5EF18C9B1CED401D06@qq.com?part=2

      reply	other threads:[~2026-11-12 13:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11 13:36 [BUG] virtio_net: RX stall caused by masking callbacks after NAPI ownership release Congjie Zhou
2026-11-11 13:50 ` [PATCH net 1/2] net: napi: add completion with an ordered IRQ mask callback Congjie Zhou
2026-11-11 13:56   ` netdev-bot+sinfo
2026-11-11 15:08     ` zcj
2026-11-12 13:52   ` sashiko-bot
2026-11-11 13:50 ` [PATCH net 2/2] virtio_net: mask callbacks before releasing NAPI ownership Congjie Zhou
2026-11-12 13:52   ` sashiko-bot [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=sashiko-outbox-211234@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=eperezma@redhat.com \
    --cc=mst@redhat.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=virtualization@lists.linux.dev \
    --cc=zcjie0802@qq.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