]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
vhost-vdpa: fix vhost_vdpa_map() on error condition
authorSi-Wei Liu <si-wei.liu@oracle.com>
Sat, 3 Oct 2020 05:02:09 +0000 (01:02 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Oct 2020 09:55:57 +0000 (11:55 +0200)
commitec7257845d40ee81ed18f67d97df87e7107d4cc4
tree5661995286d70f1044d6574f95328eebe0c183c4
parent72d41c97e736bfa7acf91b91d6f3c27a9499f2aa
vhost-vdpa: fix vhost_vdpa_map() on error condition

[ Upstream commit 1477c8aebb94a1db398c12d929a9d27bbd678d8c ]

vhost_vdpa_map() should remove the iotlb entry just added
if the corresponding mapping fails to set up properly.

Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend")
Signed-off-by: Si-Wei Liu <si-wei.liu@oracle.com>
Link: https://lore.kernel.org/r/1601701330-16837-2-git-send-email-si-wei.liu@oracle.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/vhost/vdpa.c