On 7/25/22 22:32, David Marchand wrote:
translate_ring_addresses and numa_realloc may change a virtio device and virtio queue. Callers of those helpers must be extra careful and refresh any reference to old data. Change those functions prototype as a way to hint about this issue and always ask for an indirect pointer. Besides, when reallocating the device and queue, the code already made sure it will return a pointer to a valid device. The checks on such returned pointer can be removed. Signed-off-by: David Marchand <david.march...@redhat.com> --- lib/vhost/vhost_user.c | 144 +++++++++++++++++++---------------------- 1 file changed, 66 insertions(+), 78 deletions(-)
Reviewed-by: Maxime Coquelin <maxime.coque...@redhat.com> Thanks, Maxime