virtio_console: Stop doing DMA on the stack
authorAndy Lutomirski <luto@kernel.org>
Tue, 30 Aug 2016 15:04:15 +0000 (08:04 -0700)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 9 Sep 2016 18:12:45 +0000 (21:12 +0300)
commit5e59d9a1aed26abcc79abe78af5cfd34e53cbe7f
tree9c34949bcb829727a52e68fd7bf48d3b942b7a89
parentaf7c1beccfd98bad752644dc14ea93805d65b2c9
virtio_console: Stop doing DMA on the stack

virtio_console uses a small DMA buffer for control requests.  Move
that buffer into heap memory.

Doing virtio DMA on the stack is normally okay on non-DMA-API virtio
systems (which is currently most of them), but it breaks completely
if the stack is virtually mapped.

Tested by typing both directions using picocom aimed at /dev/hvc0.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
drivers/char/virtio_console.c