vfio: fix use after free with multiprocess
authorWei Hu (Xavier) <xavier.huwei@huawei.com>
Tue, 21 Apr 2020 03:29:57 +0000 (11:29 +0800)
committerDavid Marchand <david.marchand@redhat.com>
Tue, 21 Apr 2020 16:13:44 +0000 (18:13 +0200)
commitd6298844da7e3e83034f1af196bdfddf388f979e
treec57ffdb38549b2a423001464c2487dbe0792394b
parentb758423bc4fe412941a289f3181849669c02b904
vfio: fix use after free with multiprocess

This patch fixes the heap-use-after-free bug which was found by ASAN
(Address-Sanitizer) in the vfio_get_default_container_fd function.

Fixes: 6bcb7c95fe14 ("vfio: share default container in multi-process")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/librte_eal/linux/eal_vfio.c