DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>
Cc: dev <dev@dpdk.org>, "Wang, Yinan" <yinan.wang@intel.com>,
	 "Xia, Chenbo" <chenbo.xia@intel.com>,
	Adrian Moreno Zapata <amorenoz@redhat.com>,
	 Wei Ling <weix.ling@intel.com>, Yu Jiang <yux.jiang@intel.com>,
	 Jun W Zhou <junx.w.zhou@intel.com>
Subject: Re: [dpdk-dev] [PATCH] net/virtio: fix missing listen FD initialization
Date: Mon, 1 Feb 2021 10:52:59 +0100	[thread overview]
Message-ID: <CAJFAV8ymacE5ngHqOTOFuQBu6QFDw-qcKTMEUt8GaAgBbYWTsw@mail.gmail.com> (raw)
In-Reply-To: <20210201093317.6761-1-maxime.coquelin@redhat.com>

On Mon, Feb 1, 2021 at 10:33 AM Maxime Coquelin
<maxime.coquelin@redhat.com> wrote:
>
> When running in client mode, the listen file descriptor
> is not initialized, and so has value 0. At destroy time,
> the listen FD is closed if its value is greater than or
> equal to zero, which causes STDIN to be closed.
>
> Fixes: 949735312f5e ("net/virtio: move vhost-user specifics to its backend")
> Bugzilla ID: 630

We put the Bugzilla ID: tag before Fixes:.

>
> Reported-by: Jun W Zhou <junx.w.zhou@intel.com>
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
>  drivers/net/virtio/virtio_user/vhost_user.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/net/virtio/virtio_user/vhost_user.c
> index ec2c53c8fb..f8569f6e6f 100644
> --- a/drivers/net/virtio/virtio_user/vhost_user.c
> +++ b/drivers/net/virtio/virtio_user/vhost_user.c
> @@ -831,6 +831,7 @@ vhost_user_setup(struct virtio_user_dev *dev)
>         dev->backend_data = data;
>
>         data->vhostfd = -1;
> +       data->listenfd = -1;
>
>         fd = socket(AF_UNIX, SOCK_STREAM, 0);
>         if (fd < 0) {
> --
> 2.29.2
>

Reviewed-by: David Marchand <david.marchand@redhat.com>


-- 
David Marchand


  reply	other threads:[~2021-02-01  9:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-01  9:33 Maxime Coquelin
2021-02-01  9:52 ` David Marchand [this message]
2021-02-02  9:26 ` Zhou, JunX W
2021-02-02 23:11   ` Ferruh Yigit

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=CAJFAV8ymacE5ngHqOTOFuQBu6QFDw-qcKTMEUt8GaAgBbYWTsw@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=amorenoz@redhat.com \
    --cc=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=junx.w.zhou@intel.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=weix.ling@intel.com \
    --cc=yinan.wang@intel.com \
    --cc=yux.jiang@intel.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;
as well as URLs for NNTP newsgroup(s).