vhost: fetch ring address after NUMA reallocation
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Fri, 13 Oct 2017 09:30:21 +0000 (11:30 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 13 Oct 2017 20:08:21 +0000 (22:08 +0200)
commit86fe881c03cf1aa3e93c5e6534b9974f7350f823
tree039d5766b5c25df50e1b20a87591d9aefacc0e54
parentb9c07b314160a91da7cf8d398dab33da179757f7
vhost: fetch ring address after NUMA reallocation

In case of NUMA reallocation, the virtqueue struct is reallocated
on another socket, meaning that its address changes.

In translate_ring_addresses(), addr pointer was not fetched again
after the reallocation, so it pointed to freed memory.

This patch just fetch again addr pointer after the reallocation.

Reported-by: Lei Yao <lei.a.yao@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
lib/librte_vhost/vhost_user.c