Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost

Pull virtio fixes from Michael Tsirkin:
"A couple of last minute bugfixes"

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
virtio-mem: Fix build error due to improper use 'select'
virtio_balloon: fix up endian-ness for free cmd id
virtio-balloon: Document byte ordering of poison_val
vhost/scsi: fix up req type endian-ness
firmware: Fix a reference count leak.

+16 -6
+4 -3
drivers/firmware/qemu_fw_cfg.c
··· 605 605 /* register entry under "/sys/firmware/qemu_fw_cfg/by_key/" */ 606 606 err = kobject_init_and_add(&entry->kobj, &fw_cfg_sysfs_entry_ktype, 607 607 fw_cfg_sel_ko, "%d", entry->select); 608 - if (err) 609 - goto err_register; 608 + if (err) { 609 + kobject_put(&entry->kobj); 610 + return err; 611 + } 610 612 611 613 /* add raw binary content access */ 612 614 err = sysfs_create_bin_file(&entry->kobj, &fw_cfg_sysfs_attr_raw); ··· 624 622 625 623 err_add_raw: 626 624 kobject_del(&entry->kobj); 627 - err_register: 628 625 kfree(entry); 629 626 return err; 630 627 }
+1 -1
drivers/vhost/scsi.c
··· 1215 1215 continue; 1216 1216 } 1217 1217 1218 - switch (v_req.type) { 1218 + switch (vhost32_to_cpu(vq, v_req.type)) { 1219 1219 case VIRTIO_SCSI_T_TMF: 1220 1220 vc.req = &v_req.tmf; 1221 1221 vc.req_size = sizeof(struct virtio_scsi_ctrl_tmf_req);
+1 -1
drivers/virtio/Kconfig
··· 85 85 depends on VIRTIO 86 86 depends on MEMORY_HOTPLUG_SPARSE 87 87 depends on MEMORY_HOTREMOVE 88 - select CONTIG_ALLOC 88 + depends on CONTIG_ALLOC 89 89 help 90 90 This driver provides access to virtio-mem paravirtualized memory 91 91 devices, allowing to hotplug and hotunplug memory.
+10 -1
drivers/virtio/virtio_balloon.c
··· 578 578 static u32 virtio_balloon_cmd_id_received(struct virtio_balloon *vb) 579 579 { 580 580 if (test_and_clear_bit(VIRTIO_BALLOON_CONFIG_READ_CMD_ID, 581 - &vb->config_read_bitmap)) 581 + &vb->config_read_bitmap)) { 582 582 virtio_cread(vb->vdev, struct virtio_balloon_config, 583 583 free_page_hint_cmd_id, 584 584 &vb->cmd_id_received_cache); 585 + /* Legacy balloon config space is LE, unlike all other devices. */ 586 + if (!virtio_has_feature(vb->vdev, VIRTIO_F_VERSION_1)) 587 + vb->cmd_id_received_cache = le32_to_cpu((__force __le32)vb->cmd_id_received_cache); 588 + } 585 589 586 590 return vb->cmd_id_received_cache; 587 591 } ··· 978 974 /* 979 975 * Let the hypervisor know that we are expecting a 980 976 * specific value to be written back in balloon pages. 977 + * 978 + * If the PAGE_POISON value was larger than a byte we would 979 + * need to byte swap poison_val here to guarantee it is 980 + * little-endian. However for now it is a single byte so we 981 + * can pass it as-is. 981 982 */ 982 983 if (!want_init_on_free()) 983 984 memset(&poison_val, PAGE_POISON, sizeof(poison_val));