[PATCH v2 37/37] baseband/acc100: reset pointer after rte_free

Maxime Coquelin maxime.coquelin at redhat.com
Thu Sep 15 13:34:47 CEST 2022



On 8/20/22 04:31, Hernan Vargas wrote:
> Set local pointer to NULL after rte_free.
> This needs to be set explicitly since logic may check for null pointers.
> 
> Fixes: 060e7672930 ("baseband/acc100: add queue configuration")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Hernan Vargas <hernan.vargas at intel.com>
> ---
>   drivers/baseband/acc100/rte_acc100_pmd.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
> index be4c1d07ed..7755d6402f 100644
> --- a/drivers/baseband/acc100/rte_acc100_pmd.c
> +++ b/drivers/baseband/acc100/rte_acc100_pmd.c
> @@ -793,6 +793,9 @@ acc100_dev_close(struct rte_bbdev *dev)
>   		rte_free(d->sw_rings_base);
>   		rte_free(d->harq_layout);
>   		d->sw_rings_base = NULL;
> +		d->tail_ptrs = NULL;
> +		d->info_ring = NULL;
> +		d->harq_layout = NULL;
>   	}
>   	/* Ensure all in flight HW transactions are completed */
>   	usleep(ACC100_LONG_WAIT);

Please move it to the top of the series as this is a fix.

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

Thanks,
Maxime



More information about the stable mailing list