mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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: [email protected] Signed-off-by: Michael S. Tsirkin <[email protected]> Acked-by: Jason Wang <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
951117a207
commit
96f105943c
1 changed files with 1 additions and 1 deletions
|
|
@ -1215,7 +1215,7 @@ vhost_scsi_ctl_handle_vq(struct vhost_scsi *vs, struct vhost_virtqueue *vq)
|
|||
continue;
|
||||
}
|
||||
|
||||
switch (v_req.type) {
|
||||
switch (vhost32_to_cpu(vq, v_req.type)) {
|
||||
case VIRTIO_SCSI_T_TMF:
|
||||
vc.req = &v_req.tmf;
|
||||
vc.req_size = sizeof(struct virtio_scsi_ctrl_tmf_req);
|
||||
|
|
|
|||
Loading…
Reference in a new issue