You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Pull vhost bugfix from Michael Tsirkin: "This includes a single bugfix for vhost-scsi" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vhost/scsi: fix reuse of &vq->iov[out] in response
This commit is contained in:
@@ -88,7 +88,7 @@ struct vhost_scsi_cmd {
|
||||
struct scatterlist *tvc_prot_sgl;
|
||||
struct page **tvc_upages;
|
||||
/* Pointer to response header iovec */
|
||||
struct iovec *tvc_resp_iov;
|
||||
struct iovec tvc_resp_iov;
|
||||
/* Pointer to vhost_scsi for our device */
|
||||
struct vhost_scsi *tvc_vhost;
|
||||
/* Pointer to vhost_virtqueue for the cmd */
|
||||
@@ -547,7 +547,7 @@ static void vhost_scsi_complete_cmd_work(struct vhost_work *work)
|
||||
memcpy(v_rsp.sense, cmd->tvc_sense_buf,
|
||||
se_cmd->scsi_sense_length);
|
||||
|
||||
iov_iter_init(&iov_iter, READ, cmd->tvc_resp_iov,
|
||||
iov_iter_init(&iov_iter, READ, &cmd->tvc_resp_iov,
|
||||
cmd->tvc_in_iovs, sizeof(v_rsp));
|
||||
ret = copy_to_iter(&v_rsp, sizeof(v_rsp), &iov_iter);
|
||||
if (likely(ret == sizeof(v_rsp))) {
|
||||
@@ -1044,7 +1044,7 @@ vhost_scsi_handle_vq(struct vhost_scsi *vs, struct vhost_virtqueue *vq)
|
||||
}
|
||||
cmd->tvc_vhost = vs;
|
||||
cmd->tvc_vq = vq;
|
||||
cmd->tvc_resp_iov = &vq->iov[out];
|
||||
cmd->tvc_resp_iov = vq->iov[out];
|
||||
cmd->tvc_in_iovs = in;
|
||||
|
||||
pr_debug("vhost_scsi got command opcode: %#02x, lun: %d\n",
|
||||
|
||||
Reference in New Issue
Block a user