qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 4/4] vhost-user-blk: fix crash in realize process


From: Raphael Norwitz
Subject: Re: [PATCH 4/4] vhost-user-blk: fix crash in realize process
Date: Mon, 13 Apr 2020 21:54:48 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

Mostly looks good - just a few superficial notes.

On Wed, Apr 15, 2020 at 11:28:26AM +0800, Li Feng wrote:
> 1. set s->connected to true after vhost_dev_init;
> 2. call vhost_dev_get_config when s->connected is true, otherwise the
>     hdev->host_ops will be nullptr.

You mean hdev->vhost_ops, right?

> 
> Signed-off-by: Li Feng <address@hidden>
> ---
>  hw/block/vhost-user-blk.c | 47 
> +++++++++++++++++++++++++----------------------
>  1 file changed, 25 insertions(+), 22 deletions(-)
> +    /*
> +     * set true util vhost_dev_init return ok, because CLOSE event may happen
> +     * in vhost_dev_init routine.
> +     */

I'm a little confused by this comment. Do you mean to say “wait until 
vhost_dev_init
succeeds to set connected to true, because a close event may happen while
vhost_dev_init is executing”?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]