[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190405102418.GF25152@stefanha-x1.localdomain>
Date: Fri, 5 Apr 2019 11:24:18 +0100
From: Stefan Hajnoczi <stefanha@...hat.com>
To: Vitaly Mayatskikh <v.mayatskih@...il.com>
Cc: linux-kernel@...r.kernel.org, "Michael S. Tsirkin" <mst@...hat.com>
Subject: Re: [PATCH] vhost/vsock: initialize vhost_vsock->hash
On Thu, Mar 28, 2019 at 01:10:57PM -0400, Vitaly Mayatskikh wrote:
> There's no current valid use case when uninitialized hash can be read
> before being written, however let's keep every vhost_vsock field
> initialized just for clarity.
>
> Signed-off-by: Vitaly Mayatskikh <v.mayatskih@...il.com>
> ---
> drivers/vhost/vsock.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
> index bb5fc0e..f43f4ed 100644
> --- a/drivers/vhost/vsock.c
> +++ b/drivers/vhost/vsock.c
> @@ -537,6 +537,7 @@ static int vhost_vsock_dev_open(struct inode *inode, struct file *file)
> spin_lock_init(&vsock->send_pkt_list_lock);
> INIT_LIST_HEAD(&vsock->send_pkt_list);
> vhost_work_init(&vsock->send_pkt_work, vhost_transport_send_pkt_work);
> + INIT_HLIST_NODE(&vsock->hash);
> return 0;
>
> out:
> --
> 1.8.3.1
Reviewed-by: Stefan Hajnoczi <stefanha@...hat.com>
Download attachment "signature.asc" of type "application/pgp-signature" (456 bytes)
Powered by blists - more mailing lists