diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-01-08 16:05:56 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-01-08 16:05:56 -0500 |
commit | b11ecb2785b94e931b445fc0ae3e7447e16b2c49 (patch) | |
tree | fc4f6fe211fe2bf0d27ca98b93e7349a566dd4e4 /drivers/virtio/virtio_pci_common.c | |
parent | 1c169383c8b6375f37c17ebd8f9e350d820f2ad3 (diff) | |
parent | 99975cc6ada0d5f2675e83abecae05aba5f437d2 (diff) |
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
pull virtio/vhost fixes from Michael Tsirkin:
"This fixes a couple of bugs triggered by hot-unplug of virtio devices,
as well as a regression in vhost-net"
* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
vhost/net: length miscalculation
virtio_pci: document why we defer kfree
virtio_pci: defer kfree until release callback
virtio_pci: device-specific release callback
virtio: make del_vqs idempotent
Diffstat (limited to 'drivers/virtio/virtio_pci_common.c')
-rw-r--r-- | drivers/virtio/virtio_pci_common.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c index 2ef9529809d8..9756f21b809e 100644 --- a/drivers/virtio/virtio_pci_common.c +++ b/drivers/virtio/virtio_pci_common.c | |||
@@ -282,6 +282,7 @@ void vp_del_vqs(struct virtio_device *vdev) | |||
282 | 282 | ||
283 | vp_free_vectors(vdev); | 283 | vp_free_vectors(vdev); |
284 | kfree(vp_dev->vqs); | 284 | kfree(vp_dev->vqs); |
285 | vp_dev->vqs = NULL; | ||
285 | } | 286 | } |
286 | 287 | ||
287 | static int vp_try_to_find_vqs(struct virtio_device *vdev, unsigned nvqs, | 288 | static int vp_try_to_find_vqs(struct virtio_device *vdev, unsigned nvqs, |
@@ -421,15 +422,6 @@ int vp_set_vq_affinity(struct virtqueue *vq, int cpu) | |||
421 | return 0; | 422 | return 0; |
422 | } | 423 | } |
423 | 424 | ||
424 | void virtio_pci_release_dev(struct device *_d) | ||
425 | { | ||
426 | /* | ||
427 | * No need for a release method as we allocate/free | ||
428 | * all devices together with the pci devices. | ||
429 | * Provide an empty one to avoid getting a warning from core. | ||
430 | */ | ||
431 | } | ||
432 | |||
433 | #ifdef CONFIG_PM_SLEEP | 425 | #ifdef CONFIG_PM_SLEEP |
434 | static int virtio_pci_freeze(struct device *dev) | 426 | static int virtio_pci_freeze(struct device *dev) |
435 | { | 427 | { |