From: Jason Wang <jasowang@redhat.com>
To: Cindy Lu <lulu@redhat.com>, mst@redhat.com, qemu-devel@nongnu.org
Cc: qemu-stable@nongnu.org
Subject: Re: [PATCH 2/3] vhost-vdpa: Add qemu_close in vhost_vdpa_cleanup
Date: Tue, 22 Sep 2020 09:56:27 +0800 [thread overview]
Message-ID: <582dede8-34a1-58ef-6deb-aa11098b63d4@redhat.com> (raw)
In-Reply-To: <20200917155851.20636-2-lulu@redhat.com>
On 2020/9/17 下午11:58, Cindy Lu wrote:
> fix the bug that fd will still open after the cleanup
>
> Signed-off-by: Cindy Lu <lulu@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
> ---
> net/vhost-vdpa.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
> index bc0e0d2d35..0480b92102 100644
> --- a/net/vhost-vdpa.c
> +++ b/net/vhost-vdpa.c
> @@ -144,6 +144,10 @@ static void vhost_vdpa_cleanup(NetClientState *nc)
> g_free(s->vhost_net);
> s->vhost_net = NULL;
> }
> + if (s->vhost_vdpa.device_fd >= 0) {
> + qemu_close(s->vhost_vdpa.device_fd);
> + s->vhost_vdpa.device_fd = -1;
> + }
> }
>
> static bool vhost_vdpa_has_vnet_hdr(NetClientState *nc)
next prev parent reply other threads:[~2020-09-22 1:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-17 15:58 [PATCH 1/3] virtio-net: Set mac address to hardware if the peer is vdpa Cindy Lu
2020-09-17 15:58 ` [PATCH 2/3] vhost-vdpa: Add qemu_close in vhost_vdpa_cleanup Cindy Lu
2020-09-22 1:56 ` Jason Wang [this message]
2020-09-17 15:58 ` [PATCH 3/3] net: Add vhost-vdpa in show_netdevs() Cindy Lu
2020-09-22 1:56 ` Jason Wang
2020-09-22 1:54 ` [PATCH 1/3] virtio-net: Set mac address to hardware if the peer is vdpa Jason Wang
2020-09-22 3:01 ` Cindy Lu
2020-09-24 7:18 ` Jason Wang
2020-09-25 7:46 ` Cindy Lu
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=582dede8-34a1-58ef-6deb-aa11098b63d4@redhat.com \
--to=jasowang@redhat.com \
--cc=lulu@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).