linux-stable/drivers/vdpa
Jason Wang 488164703f 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 19:27:28 +02:00
..
alibaba vdpa: Provide interface to read driver features 2022-01-14 18:50:53 -05:00
ifcvf vdpa: Provide interface to read driver features 2022-01-14 18:50:53 -05:00
mlx5 vdpa: mlx5: prevent cvq work from hogging CPU 2022-04-13 19:27:28 +02:00
vdpa_sim vdpa/vdpa_sim_net: Report max device capabilities 2022-01-14 18:50:54 -05:00
vdpa_user vduse: Fix returning wrong type in vduse_domain_alloc_iova() 2022-03-04 11:56:34 -05:00
virtio_pci vdpa: fix use-after-free on vp_vdpa_remove 2022-03-06 06:06:50 -05:00
Kconfig eni_vdpa: add vDPA driver for Alibaba ENI 2021-11-01 05:23:41 -04:00
Makefile eni_vdpa: add vDPA driver for Alibaba ENI 2021-11-01 05:23:41 -04:00
vdpa.c vdpa: factor out vdpa_set_features_unlocked for vdpa internal use 2022-03-04 11:56:33 -05:00