mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
virtio, vhost, qemu: bugfixes, cleanups
Fixes in qemu, vhost and virtio. Signed-off-by: Michael S. Tsirkin <[email protected]> -----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJaDdyiAAoJECgfDbjSjVRpEekIAMh6WWhjHWSG1PukqSZYiHEN S1GU+wViGLai9zI54o8/VcRcRMuJMcN/HiYXh/28N3v4MzSxtJy12c/oV13zexAZ ypALoQM6Fazm1hPdAMujFAQ4rgAgYFZ98822HU3rXwfS+jW1JY/LV0cLoIL9BStQ aHLr06GGv/Xq3aibECaKvzFcKXi9qCz6Cuw/aKPMmDo89RSvxQyMhneaEW6YyT2L Srt2lke0W4UbozMAe3UT2SwOMTEpSOnmrTDGqvU4gFtfgAm6Z8HkM1HA/i010Dcc FsSfa5N9yLD9WodEyKgU0qh3yvhkLwg/Sfiu/KBbbbSSQzjkuqW+XWWJwOAitWA= =1iSK -----END PGP SIGNATURE----- Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio updates from Michael Tsirkin: "Fixes in qemu, vhost and virtio" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: fw_cfg: fix the command line module name vhost/vsock: fix uninitialized vhost_vsock->guest_cid vhost: fix end of range for access_ok vhost/scsi: Use safe iteration in vhost_scsi_complete_cmd_work() virtio_balloon: fix deadlock on OOM
This commit is contained in:
commit
18c83d2c03
7 changed files with 84 additions and 21 deletions
|
|
@ -519,7 +519,7 @@ static void vhost_scsi_complete_cmd_work(struct vhost_work *work)
|
|||
vs_completion_work);
|
||||
DECLARE_BITMAP(signal, VHOST_SCSI_MAX_VQ);
|
||||
struct virtio_scsi_cmd_resp v_rsp;
|
||||
struct vhost_scsi_cmd *cmd;
|
||||
struct vhost_scsi_cmd *cmd, *t;
|
||||
struct llist_node *llnode;
|
||||
struct se_cmd *se_cmd;
|
||||
struct iov_iter iov_iter;
|
||||
|
|
@ -527,7 +527,7 @@ static void vhost_scsi_complete_cmd_work(struct vhost_work *work)
|
|||
|
||||
bitmap_zero(signal, VHOST_SCSI_MAX_VQ);
|
||||
llnode = llist_del_all(&vs->vs_completion_list);
|
||||
llist_for_each_entry(cmd, llnode, tvc_completion_list) {
|
||||
llist_for_each_entry_safe(cmd, t, llnode, tvc_completion_list) {
|
||||
se_cmd = &cmd->tvc_se_cmd;
|
||||
|
||||
pr_debug("%s tv_cmd %p resid %u status %#02x\n", __func__,
|
||||
|
|
|
|||
|
|
@ -1175,7 +1175,7 @@ static int iotlb_access_ok(struct vhost_virtqueue *vq,
|
|||
{
|
||||
const struct vhost_umem_node *node;
|
||||
struct vhost_umem *umem = vq->iotlb;
|
||||
u64 s = 0, size, orig_addr = addr;
|
||||
u64 s = 0, size, orig_addr = addr, last = addr + len - 1;
|
||||
|
||||
if (vhost_vq_meta_fetch(vq, addr, len, type))
|
||||
return true;
|
||||
|
|
@ -1183,7 +1183,7 @@ static int iotlb_access_ok(struct vhost_virtqueue *vq,
|
|||
while (len > s) {
|
||||
node = vhost_umem_interval_tree_iter_first(&umem->umem_tree,
|
||||
addr,
|
||||
addr + len - 1);
|
||||
last);
|
||||
if (node == NULL || node->start > addr) {
|
||||
vhost_iotlb_miss(vq, addr, access);
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -518,6 +518,8 @@ static int vhost_vsock_dev_open(struct inode *inode, struct file *file)
|
|||
goto out;
|
||||
}
|
||||
|
||||
vsock->guest_cid = 0; /* no CID assigned yet */
|
||||
|
||||
atomic_set(&vsock->queued_replies, 0);
|
||||
|
||||
vqs[VSOCK_VQ_TX] = &vsock->vqs[VSOCK_VQ_TX];
|
||||
|
|
|
|||
Loading…
Reference in a new issue