[dpdk-stable] [PATCH] vhost: fix passing destroyed device to destroy callback

Jens Freimann jfreimann at redhat.com
Tue Apr 9 16:25:53 CEST 2019


On Tue, Apr 09, 2019 at 04:36:22PM +0300, Ilya Maximets wrote:
>Application should be able to obtain information like 'ifname' from
>the 'vid' passed to 'destroy_connection' callback. Currently, all the
>API calls with passed 'vid' fails with 'device not found'.
>
>Fixes: efba12a78ddf ("vhost: add user callbacks for socket open/close")
>Cc: stable at dpdk.org
>
>Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
>---
> lib/librte_vhost/socket.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>

Because the device is destroyed before the callback is done, vid is
not a valid index to look up device information any more. So, yes we
should destroy the device after the callback.


Reviewed-by: Jens Freimann <jfreimann at redhat.com>

regards,
Jens 


More information about the stable mailing list