pci: rework interrupt fd init and fix fd leak
authorDavid Marchand <david.marchand@6wind.com>
Fri, 9 May 2014 13:15:56 +0000 (15:15 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 13 May 2014 11:20:47 +0000 (13:20 +0200)
commitd3e6faf8405e1e527fba5c55edfa147e57c6ae0d
treece12cb675c3590d42fcd901e2e72566680a8afa6
parent99d44c7e26aa07479a1368fca4d9c7a622a2ccfc
pci: rework interrupt fd init and fix fd leak

A fd leak happens in pci_map_resource when multiple bars are mapped.
Fix this by closing fd unconditionnally in this function and open the
intr_handle fd in pci_uio_map_resource instead.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
lib/librte_eal/bsdapp/eal/eal_pci.c
lib/librte_eal/linuxapp/eal/eal_pci.c