vhost/scsi: fix up req type endian-ness
authorMichael S. Tsirkin <mst@redhat.com>
Fri, 10 Jul 2020 10:36:16 +0000 (06:36 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Aug 2020 07:58:36 +0000 (09:58 +0200)
commitfde502224ed421b7e81b3a332b81d55913c1db0b
treeb7a9424ab299fa57296a23258f88cae3cca76740
parentf622b80b20b2bd018b52fec92076283b71d8adf0
vhost/scsi: fix up req type endian-ness

commit 295c1b9852d000580786375304a9800bd9634d15 upstream.

vhost/scsi doesn't handle type conversion correctly
for request type when using virtio 1.0 and up for BE,
or cross-endian platforms.

Fix it up using vhost_32_to_cpu.

Cc: stable@vger.kernel.org
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/vhost/scsi.c