linux/drivers/vdpa/mlx5
Eli Cohen ad6dc1daaf vdpa/mlx5: Avoid processing works if workqueue was destroyed
If mlx5_vdpa gets unloaded while a VM is running, the workqueue will be
destroyed. However, vhost might still have reference to the kick
function and might attempt to push new works. This could lead to null
pointer dereference.

To fix this, set mvdev->wq to NULL just before destroying and verify
that the workqueue is not NULL in mlx5_vdpa_kick_vq before attempting to
push a new work.

Fixes: 5262912ef3 ("vdpa/mlx5: Add support for control VQ and MAC setting")
Signed-off-by: Eli Cohen <elic@nvidia.com>
Link: https://lore.kernel.org/r/20220321141303.9586-1-elic@nvidia.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-03-28 16:54:30 -04:00
..
core vhost,virtio,vhost: fixes,features 2021-11-03 15:00:39 -07:00
net vdpa/mlx5: Avoid processing works if workqueue was destroyed 2022-03-28 16:54:30 -04:00
Makefile vdpa/mlx5: Connect mlx5_vdpa to auxiliary bus 2020-12-06 07:32:05 +02:00