]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
virtio_console: reset on out of memory
authorMichael S. Tsirkin <mst@redhat.com>
Fri, 20 Apr 2018 18:00:13 +0000 (21:00 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:23:48 +0000 (12:23 +0200)
commit408136ab73179d76d4b3f3ca0c0ac426420fb7b1
tree7f0e0cf759870750db16003f767bfe26f00dccbc
parentd56b557539b1c7d325ecb89e42443e033f6d7d3f
virtio_console: reset on out of memory

BugLink: http://bugs.launchpad.net/bugs/1778265
commit 5c60300d68da32ca77f7f978039dc72bfc78b06b upstream.

When out of memory and we can't add ctrl vq buffers,
probe fails. Unfortunately the error handling is
out of spec: it calls del_vqs without bothering
to reset the device first.

To fix, call the full cleanup function in this case.

Cc: stable@vger.kernel.org
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/char/virtio_console.c