linux-stable/drivers/vdpa
Jason Wang 69ec350a41 vdpa: mlx5: prevent cvq work from hogging CPU
[ Upstream commit 55ebf0d60e ]

A userspace triggerable infinite loop could happen in
mlx5_cvq_kick_handler() if userspace keeps sending a huge amount of
cvq requests.

Fixing this by introducing a quota and re-queue the work if we're out
of the budget (currently the implicit budget is one) . While at it,
using a per device work struct to avoid on demand memory allocation
for cvq.

Fixes: 5262912ef3 ("vdpa/mlx5: Add support for control VQ and MAC setting")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20220329042109.4029-1-jasowang@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Eli Cohen <elic@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-13 20:59:15 +02:00
..
ifcvf ifcvf/vDPA: fix misuse virtio-net device config size for blk dev 2022-01-27 11:05:06 +01:00
mlx5 vdpa: mlx5: prevent cvq work from hogging CPU 2022-04-13 20:59:15 +02:00
vdpa_sim vdpa_sim: avoid putting an uninitialized iova_domain 2021-12-01 09:04:55 +01:00
vdpa_user vduse: Fix returning wrong type in vduse_domain_alloc_iova() 2022-03-16 14:23:36 +01:00
virtio_pci vdpa: fix use-after-free on vp_vdpa_remove 2022-03-16 14:23:36 +01:00
Kconfig vduse: Introduce VDUSE - vDPA Device in Userspace 2021-09-06 07:20:58 -04:00
Makefile vduse: Introduce VDUSE - vDPA Device in Userspace 2021-09-06 07:20:58 -04:00
vdpa.c vdpa: Consider device id larger than 31 2021-12-22 09:32:39 +01:00