diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2018-04-20 20:24:23 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-05-01 15:13:05 -0700 |
commit | 47cb14192bcbba3f15b1c3561e05e084e56fdef6 (patch) | |
tree | 74699f13536b3066785670735a67b6315dc7825e /drivers/accessibility | |
parent | 90488aaaf37f7cf3b49f834b4fd9a66bf773d7ec (diff) | |
download | linux-rt-47cb14192bcbba3f15b1c3561e05e084e56fdef6.tar.gz |
virtio_console: free buffers after reset
commit a7a69ec0d8e4a58be7db88d33cbfa2912807bb2b upstream.
Console driver is out of spec. The spec says:
A driver MUST NOT decrement the available idx on a live
virtqueue (ie. there is no way to “unexpose” buffers).
and it does exactly that by trying to detach unused buffers
without doing a device reset first.
Defer detaching the buffers until device unplug.
Of course this means we might get an interrupt for
a vq without an attached port now. Handle that by
discarding the consumed buffer.
Reported-by: Tiwei Bie <tiwei.bie@intel.com>
Fixes: b3258ff1d6 ("virtio: Decrement avail idx on buffer detach")
Cc: stable@vger.kernel.org
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/accessibility')
0 files changed, 0 insertions, 0 deletions