DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Patrick MacArthur <patrick@patrickmacarthur.net>
Cc: dev@dpdk.org, "Burakov, Anatoly" <anatoly.burakov@intel.com>
Subject: Re: [dpdk-dev] [PATCH] vfio: fix file descriptor leak in multi-process applications
Date: Thu, 09 Feb 2017 18:36:18 +0100	[thread overview]
Message-ID: <6697903.IRQjSijl37@xps13> (raw)
In-Reply-To: <C6ECDF3AB251BE4894318F4E45123697821E7143@IRSMSX109.ger.corp.intel.com>

> > When a secondary process wants access to the VFIO container file descriptor,
> > the primary process calls vfio_get_container_fd() which always opens an
> > entirely new file descriptor on /dev/vfio/vfio.
> > However, once the file descriptor has been passed to the subprocess, it is
> > effectively duplicated, meaning that the copy of the file descriptor in the
> > primary process is no longer needed.  However, the primary process does
> > not close the duplicate fd, which results in a resource leak.
> > 
> > This can be reproduced by starting a primary process with a small
> > RLIMIT_NOFILE limit configured to use VFIO for at least one device, and
> > repeatedly launching secondary processes until the file descriptor limit is
> > exceeded.
> > 
> > Fix the resource leak by closing the local vfio container file descriptor after
> > passing it to the secondary process.
> > 
> > Fixes: 2f4adfad0a69 ("vfio: add multiprocess support")
> > Signed-off-by: Patrick MacArthur <patrick@patrickmacarthur.net>
> 
> Acked-by: Anatoly  Burakov <anatoly.burakov@intel.com>

Applied, thanks

      reply	other threads:[~2017-02-09 17:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-26 23:05 Patrick MacArthur
2017-02-09 11:41 ` Burakov, Anatoly
2017-02-09 17:36   ` Thomas Monjalon [this message]

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=6697903.IRQjSijl37@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=patrick@patrickmacarthur.net \
    /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).