vhost: fix error handling when mem table gets updated
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Fri, 12 Oct 2018 12:40:33 +0000 (14:40 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 18 Oct 2018 08:24:39 +0000 (10:24 +0200)
commit74ee315e4f1bcbcabae054d310b730be13e49ad4
treeb54647f04010f5d9092000ad0944d572574e73a5
parent57b4d90b5893db2678ca3e28c50e1fcd37bb9b91
vhost: fix error handling when mem table gets updated

When the memory table gets updated, the rings addresses need
to be translated again. If it fails, we need to exit cleanly
by unmapping memory regions.

Fixes: d5022533c20a ("vhost: retranslate vring addr when memory table changes")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Ilya Maximets <i.maximets@samsung.com>
lib/librte_vhost/vhost_user.c