]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
vringh: Fix loop descriptors check in the indirect cases
authorXie Yongji <xieyongji@bytedance.com>
Thu, 5 May 2022 10:09:10 +0000 (18:09 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 26 Aug 2022 08:53:10 +0000 (10:53 +0200)
commit9e5e9a55b30d0737f89650aa67f11e83f3f7df5b
tree0750cb176d1b9637c3b1f62eadc2df74113b959d
parentc7d118d6e07ebdbc6654d51a752283e88cf17b6a
vringh: Fix loop descriptors check in the indirect cases

BugLink: https://bugs.launchpad.net/bugs/1982968
[ Upstream commit dbd29e0752286af74243cf891accf472b2f3edd8 ]

We should use size of descriptor chain to test loop condition
in the indirect case. And another statistical count is also introduced
for indirect descriptors to avoid conflict with the statistical count
of direct descriptors.

Fixes: f87d0fbb5798 ("vringh: host-side implementation of virtio rings.")
Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Signed-off-by: Fam Zheng <fam.zheng@bytedance.com>
Message-Id: <20220505100910.137-1-xieyongji@bytedance.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/vhost/vringh.c