From: Jianlin Shi <shijianlin11@foxmail.com>
To: 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: Sun, 22 Nov 2026 19:37:02 +0800 [thread overview]
Message-ID: <20261122113703.30415-1-shijianlin11@foxmail.com> (raw)
In-Reply-To: <179533878871.3294.14009692721054097098@kernel.org>
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
next prev parent reply other threads:[~2026-11-22 11:37 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 [this message]
2026-11-30 15:26 ` willemb
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=20261122113703.30415-1-shijianlin11@foxmail.com \
--to=shijianlin11@foxmail.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=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