patches for DPDK stable branches
 help / color / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Tiwei Bie <tiwei.bie@intel.com>, dev@dpdk.org, zhihong.wang@intel.com
Cc: stable@dpdk.org
Subject: Re: [dpdk-stable] [PATCH] vhost: fix slave request fd leak
Date: Wed, 18 Sep 2019 15:09:56 +0200
Message-ID: <b5017914-4ed8-1970-7a15-b4bcbfba4085@redhat.com> (raw)
In-Reply-To: <20190905110125.19946-1-tiwei.bie@intel.com>



On 9/5/19 1:01 PM, Tiwei Bie wrote:
> We need to close the old slave request fd if any first
> before taking the new one.
> 
> Fixes: 275c3f944730 ("vhost: support slave requests channel")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
> ---
>  lib/librte_vhost/vhost_user.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
> index 0b72648a5..f46843610 100644
> --- a/lib/librte_vhost/vhost_user.c
> +++ b/lib/librte_vhost/vhost_user.c
> @@ -1564,6 +1564,9 @@ vhost_user_set_req_fd(struct virtio_net **pdev, struct VhostUserMsg *msg,
>  		return RTE_VHOST_MSG_RESULT_ERR;
>  	}
>  
> +	if (dev->slave_req_fd >= 0)
> +		close(dev->slave_req_fd);
> +
>  	dev->slave_req_fd = fd;
>  
>  	return RTE_VHOST_MSG_RESULT_OK;
> 

Applied to dpdk-next-virtio/master.

Thanks,
Maxime

      parent reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-05 11:01 Tiwei Bie
2019-09-09 10:13 ` Maxime Coquelin
2019-09-18 13:09 ` Maxime Coquelin [this message]

Reply instructions:

You may reply publically 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=b5017914-4ed8-1970-7a15-b4bcbfba4085@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=tiwei.bie@intel.com \
    --cc=zhihong.wang@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

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox