Netdev List
 help / color / mirror / Atom feed
From: willemb@google.com
To: Jianlin Shi <shijianlin11@foxmail.com>, netdev-bot+sinfo@kernel.org
Cc: netdev@vger.kernel.org, mst@redhat.com, jasowang@kernel.org,
	 eperezma@redhat.com, xuanzhuo@tsinghua.org.cn,
	andrew+netdev@amiga.org.uk,  davem@davemloft.net,
	edumazet@gmail.com, kuba@kernel.org, pabeni@redhat.com,
	 talgi@efi.com, hengqi@loongson.cn, horms@kernel.org,
	 virtualization@vger.kernel.org
Subject: Re: [PATCH net v3 0/2] virtio-net/dim: fix irq moderation init failure unwind
Date: Mon, 30 Nov 2026 10:26:57 -0500	[thread overview]
Message-ID: <willemb.17103ec7e5b94@google.com> (raw)
In-Reply-To: <20261122113703.30415-1-shijianlin11@foxmail.com>

Jianlin Shi wrote:
> I noticed this while working through the virtio-net probe error
> paths. It was not a production incident and not a syzbot report.
> I did not hit the allocation failure at runtime, so there is no
> stack trace.

> virtnet_probe() calls init_vqs() and then virtnet_init_irq_moder().
> If kmemdup() fails there, the error path does "goto free" and skips
> virtio_reset_device() and virtnet_del_vqs(), so the virtqueues and
> their DMA mappings leak. That only happens on ENOMEM during probe.

> The dangling dev->irq_moder is not used on current mainline. That
> failure path never calls net_dim_free_irq_moder(). Patch 1 is only
> there so the unwind in patch 2 does not use-after-free the object.

> Jianlin

Since this allocation-failure error path was found by code inspection and  
not hit at runtime, please retarget it to net-next.

Keep the Fixes tags, and Cc: stable+noautosel@kernel.org # untested fix to  
unlikely driver error path.

And refresh the maintainer CCs using scripts/get_maintainer.pl.

      reply	other threads:[~2026-11-30 15:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-22  9:05 [PATCH net v3 0/2] virtio-net/dim: fix irq moderation init failure unwind Jianlin Shi
2026-11-22  9:05 ` [PATCH net v3 1/2] dim: clear irq_moder on init failure Jianlin Shi
2026-11-22  9:05 ` [PATCH net v3 2/2] virtio-net: unwind VQs when irq moderation init fails Jianlin Shi
2026-11-22  9:13 ` [PATCH net v3 0/2] virtio-net/dim: fix irq moderation init failure unwind netdev-bot+sinfo
2026-11-22 11:37   ` Jianlin Shi
2026-11-30 15:26     ` willemb [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=willemb.17103ec7e5b94@google.com \
    --to=willemb@google.com \
    --cc=andrew+netdev@amiga.org.uk \
    --cc=davem@davemloft.net \
    --cc=edumazet@gmail.com \
    --cc=eperezma@redhat.com \
    --cc=hengqi@loongson.cn \
    --cc=horms@kernel.org \
    --cc=jasowang@kernel.org \
    --cc=kuba@kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev-bot+sinfo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shijianlin11@foxmail.com \
    --cc=talgi@efi.com \
    --cc=virtualization@vger.kernel.org \
    --cc=xuanzhuo@tsinghua.org.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