[PATCH v3 2/4] event/dsw: fix missing device pointer

Mattias Rönnblom hofors at lysator.liu.se
Wed Oct 18 08:27:39 CEST 2023


On 2023-10-17 18:46, Bruce Richardson wrote:
> Initialize the "dev" pointer in the eventdev structure so it can be
> returned in calls to "rte_event_dev_info_get()" and avoid potential
> crashes due to a NULL value being passed to "rte_dev_name()"
> 
> Fixes: 46a186b1f0c5 ("event/dsw: add device registration and build system")
> Cc: mattias.ronnblom at ericsson.com
> Cc: stable at dpdk.org
> 
> Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
> ---
>   drivers/event/dsw/dsw_evdev.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c
> index 785c12f61f..44da3c60d1 100644
> --- a/drivers/event/dsw/dsw_evdev.c
> +++ b/drivers/event/dsw/dsw_evdev.c
> @@ -440,6 +440,7 @@ dsw_probe(struct rte_vdev_device *vdev)
>   		return -EFAULT;
>   
>   	dev->dev_ops = &dsw_evdev_ops;
> +	dev->dev = &vdev->device;
>   	dev->enqueue = dsw_event_enqueue;
>   	dev->enqueue_burst = dsw_event_enqueue_burst;
>   	dev->enqueue_new_burst = dsw_event_enqueue_new_burst;

Acked-by: Mattias Rönnblom <mattias.ronnblom at ericsson.com>


More information about the dev mailing list