[dpdk-dev] [PATCH 1/2] net/vhost: fix Vhost setup error path
Tiwei Bie
tiwei.bie at intel.com
Wed Feb 19 04:05:50 CET 2020
On Tue, Feb 18, 2020 at 06:22:39PM +0100, Maxime Coquelin wrote:
> If for some reason vhost_driver_setup() fails, the list
> element for the device may be freed without being removed
> from the internal list of devices.
>
> This patch fixes all the error paths, by unregistering the
> device from Vhost library it has been registered, remove
> the device from the list, reset device vring_state pointer
> from the global table and only free vring state if it had
> been allocated.
>
> Fixes: 3d01b759d267 ("net/vhost: delay driver setup")
>
> Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> Reviewed-by: David Marchand <david.marchand at redhat.com>
> ---
> drivers/net/vhost/rte_eth_vhost.c | 21 ++++++++++++++-------
> 1 file changed, 14 insertions(+), 7 deletions(-)
Reviewed-by: Tiwei Bie <tiwei.bie at intel.com>
Thanks,
Tiwei
More information about the dev
mailing list