Go to file
Darek Stojaczyk 047e3f9f2a vfio: do not needlessly setup device in secondary process
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 fully prevent setting up devices in secondary
processes that weren't setup in the primary process.

Fixes: 2f4adfad0a ("vfio: add multiprocess support")

Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-11-25 13:09:05 +01:00
app app/eventdev: fix possible uninitialized variable 2018-11-23 01:43:47 +01:00
buildtools mk: allow renaming of build directories 2018-11-14 01:46:00 +01:00
config config: enable more than 128 cores for arm64 2018-11-23 02:03:33 +01:00
devtools devtools: fix regex in symbol addition check 2018-11-18 23:38:26 +01:00
doc doc: improve hash library guide 2018-11-25 11:09:03 +01:00
drivers vfio: do not needlessly setup device in secondary process 2018-11-25 13:09:05 +01:00
examples examples/ipv4_multicast: fix leak of cloned packets 2018-11-18 22:55:52 +01:00
kernel kni: fix build on Linux < 3.14 2018-10-27 00:18:06 +02:00
lib eal/bsd: fix possible IOPL fd leak 2018-11-25 11:44:25 +01:00
license license: introduce SPDX identifiers 2018-01-04 22:41:38 +01:00
mk mk: allow renaming of build directories 2018-11-14 01:46:00 +01:00
pkg version: 18.08.0 2018-08-09 23:11:26 +02:00
test test: release ring resources after PMD perf test 2018-11-18 23:23:22 +01:00
usertools usertools: skip empty categories in devices status 2018-11-23 01:43:20 +01:00
.gitattributes improve git diff 2016-11-13 15:25:12 +01:00
.gitignore doc: add compression driver and ISA-L PMD guides 2018-05-10 17:46:20 +01:00
GNUmakefile move kernel modules directories 2018-03-21 23:04:21 +01:00
MAINTAINERS security: remove experimental tag 2018-11-18 22:31:30 +01:00
Makefile license: use SPDX tag in root makefile 2018-01-04 22:41:38 +01:00
meson_options.txt build: add option to override drivers install directory 2018-10-27 23:22:21 +02:00
meson.build version: 18.11-rc4 2018-11-19 01:40:54 +01:00
README license: introduce SPDX identifiers 2018-01-04 22:41:38 +01:00

DPDK is a set of libraries and drivers for fast packet processing.
It supports many processor architectures and both FreeBSD and Linux.

The DPDK uses the Open Source BSD-3-Clause license for the core libraries
and drivers. The kernel components are GPL-2.0 licensed.

Please check the doc directory for release notes,
API documentation, and sample application information.

For questions and usage discussions, subscribe to: users@dpdk.org
Report bugs and issues to the development mailing list: dev@dpdk.org