Skip to content

virtio-console: spec compliance fixes

Michael S. Tsirkin lkml stable virtualization 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 21 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6virtio_console: don't tie bufs to a vqdrivers/char/virtio_console.c+7 -76 replies
2/6virtio: add ability to iterate over vqsinclude/linux/virtio.h+3 -00 replies
2/6virtio: add ability to iterate over vqsinclude/linux/virtio.h+3 -00 replies
3/6virtio_console: free buffers after resetdrivers/char/virtio_console.c+24 -252 replies
4/6virtio_console: drop custom control queue cleanupdrivers/char/virtio_console.c+0 -170 replies
4/6virtio_console: drop custom control queue cleanupdrivers/char/virtio_console.c+0 -170 replies
5/6virtio_console: move removal codedrivers/char/virtio_console.c+36 -360 replies
5/6virtio_console: move removal codedrivers/char/virtio_console.c+36 -360 replies
6/6virtio_console: reset on out of memorydrivers/char/virtio_console.c+10 -70 replies
6/6virtio_console: reset on out of memorydrivers/char/virtio_console.c+10 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] virtio-console: spec compliance fixes

Turns out virtio console tries to take a buffer out of an active vq. Works by sheer luck, and is explicitly forbidden by spec. And while going over it I saw that error handling is also broken - failure is easy to trigger if I force allocations to fail.

Lightly tested.

Michael S. Tsirkin (6):
virtio_console: don't tie bufs to a vq
virtio: add ability to iterate over vqs
virtio_console: free buffers after reset
virtio_console: drop custom control queue cleanup
virtio_console: move removal code
virtio_console: reset on out of memory

 drivers/char/virtio_console.c | 155 ++++++++++++++++++++----------------------
 include/linux/virtio.h        |   3 +
 2 files changed, 75 insertions(+), 83 deletions(-)
Signature · 1 line
MST