DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Cc: dev@dpdk.org, "Burakov, Anatoly" <anatoly.burakov@intel.com>
Subject: Re: [dpdk-dev] [PATCH] vfio: don't needlessly setup devices in secondary process
Date: Sun, 25 Nov 2018 13:03:46 +0100	[thread overview]
Message-ID: <2986248.Quj79joPid@xps> (raw)
In-Reply-To: <902e9ebc-e658-fd41-55ce-8ba9e3a72728@intel.com>

23/11/2018 10:12, Burakov, Anatoly:
> On 21-Nov-18 6:41 PM, Darek Stojaczyk wrote:
> > Setting up a device that wasn't setup in the primary
> > process will possibly break the primary process. That's
> > because the IPC message to retrieve the group fd in the
> > primary will also *open* that group if it wasn't opened
> > before. Even though the secondary process closes that fd
> > soon after as a part of its error handling path, the
> > primary process leaks it.
> > 
> > What's worse, opening that fd on the primary will
> > increment the process-local counter of opened groups.
> > If it was 0 before, then the group will never be added
> > to the vfio container, nor dpdk memory will be ever
> > mapped.
> > 
> > This patch moves the proper error checks earlier in the
> > code to fuly prevent setting up devices in secondary
> > processes that weren't setup in the primary process.
> > 
> > Fixes: 2f4adfad0a69 ("vfio: add multiprocess support")
> > Cc: anatoly.burakov@intel.com
> > 
> > Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
> 
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

Applied, thanks

  reply	other threads:[~2018-11-25 12:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-21 18:41 Darek Stojaczyk
2018-11-23  9:12 ` Burakov, Anatoly
2018-11-25 12:03   ` Thomas Monjalon [this message]
2018-11-23 13:20 ` Maxime Coquelin

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=2986248.Quj79joPid@xps \
    --to=thomas@monjalon.net \
    --cc=anatoly.burakov@intel.com \
    --cc=dariusz.stojaczyk@intel.com \
    --cc=dev@dpdk.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).