kernel_optimize_test/drivers/virtio
Michael S. Tsirkin 56daa21414 virtio_ring: mark ring unused on error
commit 1861ba626ae9b98136f3e504208cdef6b29cd3ec upstream.

A recently added error path does not mark ring unused when exiting on
OOM, which will lead to BUG on the next entry in debug builds.

TODO: refactor code so we have START_USE and END_USE in the same function.

Fixes: fc6d70f40b3d ("virtio_ring: check desc == NULL when using indirect with packed")
Cc: "Xuan Zhuo" <xuanzhuo@linux.alibaba.com>
Cc: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-27 10:54:33 +01:00
..
Kconfig vhost,vdpa,virtio: cleanups, fixes 2020-10-23 11:00:57 -07:00
Makefile
virtio_balloon.c virtio-balloon: Constify id_table 2020-10-21 10:34:08 -04:00
virtio_dma_buf.c
virtio_input.c virtio_input: Constify id_table 2020-10-21 10:34:09 -04:00
virtio_mem.c vhost,vdpa,virtio: cleanups, fixes 2020-10-23 11:00:57 -07:00
virtio_mmio.c
virtio_pci_common.c virtio_pci: Support surprise removal of virtio pci device 2021-09-03 10:09:27 +02:00
virtio_pci_common.h
virtio_pci_legacy.c
virtio_pci_modern.c
virtio_ring.c virtio_ring: mark ring unused on error 2022-01-27 10:54:33 +01:00
virtio_vdpa.c virtio_vdpa: reject invalid vq indices 2021-09-03 10:09:27 +02:00
virtio.c virtio: write back F_VERSION_1 before validate 2021-10-20 11:45:01 +02:00