]> git.baikalelectronics.ru Git - kernel.git/commit
vdpa_sim_blk: call vringh_complete_iotlb() also in the error path
authorStefano Garzarella <sgarzare@redhat.com>
Thu, 30 Jun 2022 15:32:21 +0000 (17:32 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 11 Aug 2022 08:26:07 +0000 (04:26 -0400)
commita3e84e605502d26693b215590bdc8753868dc105
treeff2df3639ffdc65144bac9daa76ca71345dd651a
parentc4a1b4569f2336edf342afb226f02a7241c9e5e9
vdpa_sim_blk: call vringh_complete_iotlb() also in the error path

Call vringh_complete_iotlb() even when we encounter a serious error
that prevents us from writing the status in the "in" header
(e.g. the header length is incorrect, etc.).

The guest is misbehaving, so maybe the ring is in a bad state, but
let's avoid making things worse.

Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20220630153221.83371-4-sgarzare@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/vdpa_sim/vdpa_sim_blk.c