Skip to content

Commit

Permalink
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/mst/vhost

Pull virtio fixes from Michael Tsirkin:
 "Several fixes, add more reviewers to the list"

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
  virtio: Honour 'may_reduce_num' in vring_create_virtqueue
  MAiNTAINERS: add Paolo, Stefan for virtio blk/scsi
  virtio_pci: fix a NULL pointer reference in vp_del_vqs
  • Loading branch information
torvalds committed Apr 10, 2019
2 parents e33c1b9 + cf94db2 commit ed79cc8
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
15 changes: 14 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -16509,7 +16509,7 @@ F: drivers/char/virtio_console.c
F: include/linux/virtio_console.h
F: include/uapi/linux/virtio_console.h

VIRTIO CORE, NET AND BLOCK DRIVERS
VIRTIO CORE AND NET DRIVERS
M: "Michael S. Tsirkin" <[email protected]>
M: Jason Wang <[email protected]>
L: [email protected]
Expand All @@ -16524,6 +16524,19 @@ F: include/uapi/linux/virtio_*.h
F: drivers/crypto/virtio/
F: mm/balloon_compaction.c

VIRTIO BLOCK AND SCSI DRIVERS
M: "Michael S. Tsirkin" <[email protected]>
M: Jason Wang <[email protected]>
R: Paolo Bonzini <[email protected]>
R: Stefan Hajnoczi <[email protected]>
L: [email protected]
S: Maintained
F: drivers/block/virtio_blk.c
F: drivers/scsi/virtio_scsi.c
F: include/uapi/linux/virtio_blk.h
F: include/uapi/linux/virtio_scsi.h
F: drivers/vhost/scsi.c

VIRTIO CRYPTO DRIVER
M: Gonglei <[email protected]>
L: [email protected]
Expand Down
8 changes: 5 additions & 3 deletions drivers/virtio/virtio_pci_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,11 @@ void vp_del_vqs(struct virtio_device *vdev)
for (i = 0; i < vp_dev->msix_used_vectors; ++i)
free_irq(pci_irq_vector(vp_dev->pci_dev, i), vp_dev);

for (i = 0; i < vp_dev->msix_vectors; i++)
if (vp_dev->msix_affinity_masks[i])
free_cpumask_var(vp_dev->msix_affinity_masks[i]);
if (vp_dev->msix_affinity_masks) {
for (i = 0; i < vp_dev->msix_vectors; i++)
if (vp_dev->msix_affinity_masks[i])
free_cpumask_var(vp_dev->msix_affinity_masks[i]);
}

if (vp_dev->msix_enabled) {
/* Disable the vector used for configuration */
Expand Down
2 changes: 2 additions & 0 deletions drivers/virtio/virtio_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,8 @@ static struct virtqueue *vring_create_virtqueue_split(
GFP_KERNEL|__GFP_NOWARN|__GFP_ZERO);
if (queue)
break;
if (!may_reduce_num)
return NULL;
}

if (!num)
Expand Down
2 changes: 1 addition & 1 deletion include/linux/virtio_ring.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ struct virtqueue;
/*
* Creates a virtqueue and allocates the descriptor ring. If
* may_reduce_num is set, then this may allocate a smaller ring than
* expected. The caller should query virtqueue_get_ring_size to learn
* expected. The caller should query virtqueue_get_vring_size to learn
* the actual size of the ring.
*/
struct virtqueue *vring_create_virtqueue(unsigned int index,
Expand Down

0 comments on commit ed79cc8

Please sign in to comment.