mem: fix check of physical address retrieval
authorMichal Jastrzebski <michalx.k.jastrzebski@intel.com>
Fri, 22 Jul 2016 14:33:50 +0000 (16:33 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 22 Jul 2016 15:36:25 +0000 (17:36 +0200)
commitfe7b933b7ae0eccad4cae5937da30356fcc087d2
tree75167bb710520a4ad4ff8415826ecdef7500e3f4
parent30301d0cace947f2b989caeec8a824565f873570
mem: fix check of physical address retrieval

In rte_mem_virt2phy: Value returned from a function and indicating the
number of bytes was ignored. This could cause a wrong pfn (page frame
number) mask read from pagemap file.
When read returns less than the number of sizeof(uint64_t) bytes,
function rte_mem_virt2phy returns error.

Coverity issue: 13212
Fixes: 40b966a211ab ("ivshmem: library changes for mmaping using ivshmem")

Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
lib/librte_eal/linuxapp/eal/eal_memory.c