]> git.baikalelectronics.ru Git - kernel.git/commit
virtio-console: avoid DMA from stack
authorOmar Sandoval <osandov@fb.com>
Wed, 1 Feb 2017 08:02:27 +0000 (00:02 -0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 1 Mar 2017 23:35:06 +0000 (01:35 +0200)
commite9e71a1f007aaeae2f56ab8f4624775dfaddf12f
tree2efdf37fc4b48748d19ed2e3cb8a75908581fd26
parent52f88933c005b1dc11ba26d2c1c86049eb0a6d03
virtio-console: avoid DMA from stack

put_chars() stuffs the buffer it gets into an sg, but that buffer may be
on the stack. This breaks with CONFIG_VMAP_STACK=y (for me, it
manifested as printks getting turned into NUL bytes).

Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
drivers/char/virtio_console.c