[PATCH] vhost: fix null pointer dereference

Maxime Coquelin maxime.coquelin at redhat.com
Thu Feb 10 22:23:33 CET 2022



On 1/29/22 20:07, Weiguo Li wrote:
> Fixes: 155ee3542fb1 ("vhost: improve vhost-user layer logs")
> 
> Signed-off-by: Weiguo Li <liwg06 at foxmail.com>
> ---
>   lib/vhost/vhost_user.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
> index e8297a09eb..d032998488 100644
> --- a/lib/vhost/vhost_user.c
> +++ b/lib/vhost/vhost_user.c
> @@ -671,7 +671,7 @@ numa_realloc(struct virtio_net *dev, int index)
>   	dev = rte_realloc_socket(old_dev, sizeof(*dev), 0, node);
>   	if (!dev) {
>   		VHOST_LOG_CONFIG(ERR, "(%s) failed to realloc dev on node %d\n",
> -				dev->ifname, node);
> +				old_dev->ifname, node);
>   		return old_dev;
>   	}
>   


Applied to dpdk-next-virtio/main.

Thanks,
Maxime



More information about the dev mailing list