]> git.baikalelectronics.ru Git - kernel.git/commit
vhost-vdpa: fix backend feature ioctls
authorJason Wang <jasowang@redhat.com>
Mon, 7 Sep 2020 10:43:43 +0000 (18:43 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 24 Sep 2020 09:54:36 +0000 (05:54 -0400)
commiteecc40e9ab2e13419249e44a0b894f6cc54fdce5
treefa7fd3643b97a596e38ba016d96e4aeeca0e7d61
parent2680e8b58e1c301ef27f9a6db37d585ba50d5a61
vhost-vdpa: fix backend feature ioctls

Commit a4884d115c07 ("vhost-vdpa: support get/set backend features")
introduces two malfunction backend features ioctls:

1) the ioctls was blindly added to vring ioctl instead of vdpa device
   ioctl
2) vhost_set_backend_features() was called when dev mutex has already
   been held which will lead a deadlock

This patch fixes the above issues.

Cc: Eli Cohen <elic@nvidia.com>
Reported-by: Zhu Lingshan <lingshan.zhu@intel.com>
Fixes: a4884d115c07 ("vhost-vdpa: support get/set backend features")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20200907104343.31141-1-jasowang@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vhost/vdpa.c