[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/2] virtio: Allow .get_vhost() without vhost_started
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v2 1/2] virtio: Allow .get_vhost() without vhost_started |
Date: |
Tue, 30 Jul 2024 12:53:45 -0400 |
On Tue, Jul 23, 2024 at 06:39:39PM +0200, Hanna Czenczek wrote:
> Historically, .get_vhost() was probably only called when
> vdev->vhost_started is true. However, we now decidedly want to call it
> also when vhost_started is false, specifically so we can issue a reset
> to the vhost back-end while device operation is stopped.
>
> Some .get_vhost() implementations dereference some pointers (or return
> offsets from them) that are probably guaranteed to be non-NULL when
> vhost_started is true, but not necessarily otherwise. This patch makes
> all such implementations check all such pointers, returning NULL if any
> is NULL.
>
> Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
> ---
> include/hw/virtio/virtio.h | 1 +
> hw/display/vhost-user-gpu.c | 2 +-
> hw/net/virtio-net.c | 19 +++++++++++++++++--
> hw/virtio/virtio-crypto.c | 18 +++++++++++++++---
> 4 files changed, 34 insertions(+), 6 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
signature.asc
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v2 1/2] virtio: Allow .get_vhost() without vhost_started,
Stefan Hajnoczi <=