git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
vhost: fix error handling when mem table gets updated
[dpdk.git]
/
lib
/
librte_vhost
/
vhost_user.c
diff --git
a/lib/librte_vhost/vhost_user.c
b/lib/librte_vhost/vhost_user.c
index
1ef02c9
..
83d3e63
100644
(file)
--- a/
lib/librte_vhost/vhost_user.c
+++ b/
lib/librte_vhost/vhost_user.c
@@
-953,8
+953,10
@@
vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg)
vring_invalidate(dev, vq);
dev = translate_ring_addresses(dev, i);
- if (!dev)
- return VH_RESULT_ERR;
+ if (!dev) {
+ dev = *pdev;
+ goto err_mmap;
+ }
*pdev = dev;
}