ivshmem: fix race condition
ivshmem: fix race condition

The memory zone could be freed just after adding it to the metadata
file and just before marking it as not freeable.
This patch changes the locking logic in order to prevent it.

Fixes: cd10c42eb5bc ("mem: fix ivshmem freeing")

Signed-off-by: Mauricio Vasquez B <3c3d05761bb6e7ed574fac8375065a4e1e1e099e@studenti.polito.it>
Acked-by: Anatoly Burakov <814e00d8f6e4e81b7ccc7e3e5a0bfec0078f0203@intel.com>

john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk