From: Dan Jurgens <danielj@nvidia.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: netdev@vger.kernel.org, jasowang@redhat.com, pabeni@redhat.com,
virtualization@lists.linux.dev, parav@nvidia.com,
shshitrit@nvidia.com, yohadt@nvidia.com,
xuanzhuo@linux.alibaba.com, eperezma@redhat.com, jgg@ziepe.ca,
kevin.tian@intel.com, kuba@kernel.org, andrew+netdev@lunn.ch,
edumazet@google.com
Subject: Re: [PATCH net-next v20 00/12] virtio_net: Add ethtool flow rules support
Date: Sun, 8 Feb 2026 07:57:33 -0600 [thread overview]
Message-ID: <3512ccd8-650f-4c05-b2dc-1c4588b39c87@nvidia.com> (raw)
In-Reply-To: <20260208065456-mutt-send-email-mst@kernel.org>
On 2/8/26 5:55 AM, Michael S. Tsirkin wrote:
> On Thu, Feb 05, 2026 at 04:46:55PM -0600, Daniel Jurgens wrote:
>> v15:
>> - In virtnet_restore_up only call virtnet_close in err path if
>> netif_running. AI
>
> what was this AI specifically?
>
It was the AI review bot, forwarded by Jakub on v16:
> + * remove_vq_common resets the device and frees the vqs.
> + */
> + vi->rx_mode_work_enabled = false;
> + rtnl_unlock();
> + remove_vq_common(vi);
> + return err;
If virtnet_ff_init() fails here, remove_vq_common() frees vi->rq, vi->sq,
and vi->ctrl via virtnet_free_queues(), but the netdevice remains
registered. Could this leave the device in an inconsistent state where
subsequent operations (like virtnet_open() triggered by bringing the
interface up) would access freed memory through vi->rq[i]?
The error return propagates up to virtnet_restore() which just returns
the error without further cleanup. If userspace then tries to use the
still-registered netdevice, virtnet_open() would call try_fill_recv()
which dereferences vi->rq.
> + }
> + rtnl_unlock();
> +
> netif_tx_lock_bh(vi->dev);
> netif_device_attach(vi->dev);
> netif_tx_unlock_bh(vi->dev);
> - return err;
> + return 0;
> }
--
pw-bot: cr
next prev parent reply other threads:[~2026-02-08 13:57 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-05 22:46 [PATCH net-next v20 00/12] virtio_net: Add ethtool flow rules support Daniel Jurgens
2026-02-05 22:46 ` [PATCH net-next v20 01/12] virtio_pci: Remove supported_cap size build assert Daniel Jurgens
2026-02-05 22:46 ` [PATCH net-next v20 02/12] virtio: Add config_op for admin commands Daniel Jurgens
2026-02-05 22:46 ` [PATCH net-next v20 03/12] virtio: Expose generic device capability operations Daniel Jurgens
2026-02-05 22:46 ` [PATCH net-next v20 04/12] virtio: Expose object create and destroy API Daniel Jurgens
2026-02-05 22:47 ` [PATCH net-next v20 05/12] virtio_net: Query and set flow filter caps Daniel Jurgens
2026-02-06 6:43 ` kernel test robot
2026-02-06 22:14 ` kernel test robot
2026-02-08 11:51 ` Michael S. Tsirkin
2026-02-08 17:29 ` Michael S. Tsirkin
2026-02-05 22:47 ` [PATCH net-next v20 06/12] virtio_net: Create a FF group for ethtool steering Daniel Jurgens
2026-02-05 22:47 ` [PATCH net-next v20 07/12] virtio_net: Implement layer 2 ethtool flow rules Daniel Jurgens
2026-02-08 11:35 ` Michael S. Tsirkin
2026-02-08 11:54 ` Michael S. Tsirkin
2026-02-05 22:47 ` [PATCH net-next v20 08/12] virtio_net: Use existing classifier if possible Daniel Jurgens
2026-02-05 22:47 ` [PATCH net-next v20 09/12] virtio_net: Implement IPv4 ethtool flow rules Daniel Jurgens
2026-02-05 22:47 ` [PATCH net-next v20 10/12] virtio_net: Add support for IPv6 ethtool steering Daniel Jurgens
2026-02-08 10:08 ` Michael S. Tsirkin
2026-02-05 22:47 ` [PATCH net-next v20 11/12] virtio_net: Add support for TCP and UDP ethtool rules Daniel Jurgens
2026-02-05 22:47 ` [PATCH net-next v20 12/12] virtio_net: Add get ethtool flow rules ops Daniel Jurgens
2026-02-06 2:43 ` [PATCH net-next v20 00/12] virtio_net: Add ethtool flow rules support Jakub Kicinski
2026-02-07 10:01 ` Michael S. Tsirkin
2026-02-07 13:14 ` Dan Jurgens
2026-02-07 21:14 ` Michael S. Tsirkin
2026-02-08 11:55 ` Michael S. Tsirkin
2026-02-08 13:57 ` Dan Jurgens [this message]
2026-02-08 17:22 ` Michael S. Tsirkin
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=3512ccd8-650f-4c05-b2dc-1c4588b39c87@nvidia.com \
--to=danielj@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=edumazet@google.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=jgg@ziepe.ca \
--cc=kevin.tian@intel.com \
--cc=kuba@kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=parav@nvidia.com \
--cc=shshitrit@nvidia.com \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.com \
--cc=yohadt@nvidia.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