android_kernel_motorola_sm6375/drivers/virtio
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Maximilian Heyne a27c6bfc52 virtio-mmio: fix memory leak of vm_dev
commit fab7f259227b8f70aa6d54e1de1a1f5f4729041c upstream.

With the recent removal of vm_dev from devres its memory is only freed
via the callback virtio_mmio_release_dev. However, this only takes
effect after device_add is called by register_virtio_device. Until then
it's an unmanaged resource and must be explicitly freed on error exit.

This bug was discovered and resolved using Coverity Static Analysis
Security Testing (SAST) by Synopsys, Inc.

Cc: [email protected]
Fixes: 55c91fedd03d ("virtio-mmio: don't break lifecycle of vm_dev")
Signed-off-by: Maximilian Heyne <[email protected]>
Reviewed-by: Catalin Marinas <[email protected]>
Tested-by: Catalin Marinas <[email protected]>
Reviewed-by: Xuan Zhuo <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

Message-Id: <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Wolfram Sang <[email protected]>
2023-11-08 11:23:34 +01:00
..
Kconfig
Makefile
virtio.c
virtio_balloon.c virtio_balloon: Fix endless deflation and inflation on arm64 2023-11-08 11:23:34 +01:00
virtio_input.c
virtio_mmio.c virtio-mmio: fix memory leak of vm_dev 2023-11-08 11:23:34 +01:00
virtio_pci_common.c
virtio_pci_common.h
virtio_pci_legacy.c
virtio_pci_modern.c
virtio_ring.c virtio_ring: fix avail_wrap_counter in virtqueue_add_packed 2023-09-23 10:59:53 +02:00