mirror of https://gitee.com/openkylin/linux.git
virtio: bugfix for 3.18
This fixes a crash in virtio console multi-channel mode that got introduced in -rc1. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJUZSAsAAoJECgfDbjSjVRpsqkIAJdGYmLWLHmU1FeuT336FbD6 4mj9+b9PX+gG6pjEyWcM/hEEx7MHp/0+evyeFXkeVwSdKxoV9/F/VRAMW/LnyNvS rsJmv8ptvEscGwvwLHwnV4/xBcY8z676JxcnE4E/0KFLhRoP3h8/Bwel9wl0R8Sp BDV0ddZLbPOzCgVgOGgXkEZ7xmhwHsSlRJO6wpkzB7c4Z8QJjx6cbdiM4XcTnaaM nX5HsAG0y3Dm6CwNYrXukv4obxyOsVyt1kJGOiTjnzqhqUCFARRRM3CyDNV8+IbM qUFArNxdMoUfyhCkDqyLdrOw0gwsWkXWErunkgzPKYY3lYUF8NxqFCKbAhTwrSY= =tNTR -----END PGP SIGNATURE----- Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio bugfix from Michael S Tsirkin: "This fixes a crash in virtio console multi-channel mode that got introduced in -rc1" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio_console: move early VQ enablement
This commit is contained in:
commit
b23dc5a7cc
|
@ -1449,8 +1449,6 @@ static int add_port(struct ports_device *portdev, u32 id)
|
|||
spin_lock_init(&port->outvq_lock);
|
||||
init_waitqueue_head(&port->waitqueue);
|
||||
|
||||
virtio_device_ready(portdev->vdev);
|
||||
|
||||
/* Fill the in_vq with buffers so the host can send us data. */
|
||||
nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock);
|
||||
if (!nr_added_bufs) {
|
||||
|
@ -2026,6 +2024,8 @@ static int virtcons_probe(struct virtio_device *vdev)
|
|||
spin_lock_init(&portdev->ports_lock);
|
||||
INIT_LIST_HEAD(&portdev->ports);
|
||||
|
||||
virtio_device_ready(portdev->vdev);
|
||||
|
||||
if (multiport) {
|
||||
unsigned int nr_added_bufs;
|
||||
|
||||
|
|
Loading…
Reference in New Issue