[dpdk-dev] [PATCH 1/5] net/virtio: fix queue memory leak on error

Maxime Coquelin maxime.coquelin at redhat.com
Wed Jun 5 14:35:57 CEST 2019



On 6/5/19 11:43 AM, Tiwei Bie wrote:
> We should free queues when we failed to initialize the
> virtio device.
> 
> Fixes: 26b683b4f7d0 ("net/virtio: setup Rx queue interrupts")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Tiwei Bie <tiwei.bie at intel.com>
> ---
>   drivers/net/virtio/virtio_ethdev.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
> index c4570bbf8..df3a218a8 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -1752,6 +1752,7 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
>   	if (eth_dev->data->dev_conf.intr_conf.rxq) {
>   		if (virtio_configure_intr(eth_dev) < 0) {
>   			PMD_INIT_LOG(ERR, "failed to configure interrupt");
> +			virtio_free_queues(hw);
>   			return -1;
>   		}
>   	}
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>

Thanks,
Maxime


More information about the dev mailing list