From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Yuho Choi <oss.patchbox@gmail.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Cc: "Jason Wang" <jasowangio@gmail.com>,
"Eugenio Pérez" <eperezma@redhat.com>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
virtualization@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] virtio-mem: only mark the device ready in kdump mode with vmcore support
Date: Tue, 3 Nov 2026 08:57:43 +0100 [thread overview]
Message-ID: <34e16c38-2150-4d88-be97-105b0f81f03c@kernel.org> (raw)
In-Reply-To: <20261102203518.436327-2-oss.patchbox@gmail.com>
On 11/2/26 21:35, Yuho Choi wrote:
> virtio_mem_init_kdump() marks the device DRIVER_OK before it checks for
> CONFIG_PROC_VMCORE. Without vmcore support it then fails with -EBUSY,
> and virtio_mem_probe() deletes the virtqueue on that error path without
> resetting the device first. The device is left with DRIVER_OK set and a
> queue that points at freed memory. Nothing has been queued at that
> point, so the device has nothing to process, but the driver should not
> leave a device it is giving up on marked ready.
>
> Before commit a9403425b3cf ("virtio-mem: mark device ready before
> registering callbacks in kdump mode"), virtio_mem_probe() called
> virtio_device_ready() only after virtio_mem_init() had succeeded, so this
> path never exposed a ready device.
>
> Move virtio_device_ready() into the CONFIG_PROC_VMCORE branch, right
> before the vmcore callbacks that need it are registered, so the -EBUSY
> path never sets DRIVER_OK.
>
> Fixes: a9403425b3cf ("virtio-mem: mark device ready before registering callbacks in kdump mode")
> Signed-off-by: Yuho Choi <oss.patchbox@gmail.com>
> ---
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
--
Cheers,
David
prev parent reply other threads:[~2026-11-03 7:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 20:35 Yuho Choi
2026-11-03 7:57 ` David Hildenbrand (Arm) [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=34e16c38-2150-4d88-be97-105b0f81f03c@kernel.org \
--to=david@kernel.org \
--cc=eperezma@redhat.com \
--cc=jasowangio@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=oss.patchbox@gmail.com \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.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
all inboxes | Powered by JetHome®