Hi Eelco,

On Thu, Mar 5, 2026 at 1:52 PM Eelco Chaudron via dev
<[email protected]> wrote:
>
> Coverity reports a data race where netdev_dpdk_vhost_destruct()
> accesses vhost_driver_flags without holding dpdk_mutex, while
> netdev_dpdk_vhost_client_reconfigure() writes to vhost_driver_flags
> with the mutex held (as is done 4 out of 4 times when writing).
>
> This could cause a race if another thread modifies vhost_driver_flags
> through netdev_dpdk_vhost_client_reconfigure() at the same time the
> destructor is running, potentially leading to incorrect socket cleanup.
>
> Fix by capturing the flag value while holding dpdk_mutex, similar to how
> vhost_id is already handled.
>
> Fixes: c1ff66ac80b5 ("netdev-dpdk: vHost client mode and reconnect")
> Signed-off-by: Eelco Chaudron <[email protected]>
> ---
>  lib/netdev-dpdk.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
The patch looks good to me:

Acked-by: Maxime Coquelin <[email protected]>

Thanks,
Maxime

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to