linux-kernelorg-stable/drivers/virtio
Ying Gao 528d92bfc0 virtio_input: Improve freeze handling
When executing suspend to ram, if lacking the operations
to reset device and free unused buffers before deleting
a vq, resource leaks and inconsistent device status will
appear.

According to chapter "3.3.1 Driver Requirements: Device Cleanup:"
of virtio-specification:
  Driver MUST ensure a virtqueue isn’t live
  (by device reset) before removing exposed
  buffers.

Therefore, modify the virtinput_freeze function to reset the
device and delete the unused buffers before deleting the
virtqueue, just like virtinput_remove does.

Co-developed-by: Ying Xu <ying123.xu@samsung.com>
Signed-off-by: Ying Xu <ying123.xu@samsung.com>
Co-developed-by: Junnan Wu <junnan01.wu@samsung.com>
Signed-off-by: Junnan Wu <junnan01.wu@samsung.com>
Signed-off-by: Ying Gao <ying01.gao@samsung.com>
Message-Id: <20250812095118.3622717-1-ying01.gao@samsung.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2025-08-26 03:38:19 -04:00
..
Kconfig
Makefile
virtio.c virtio, vhost: features, fixes 2025-08-01 14:17:48 -07:00
virtio_anchor.c
virtio_balloon.c mm/balloon_compaction: convert balloon_page_delete() to balloon_page_finalize() 2025-07-13 16:38:25 -07:00
virtio_debug.c virtio: introduce extended features 2025-07-08 18:04:58 +02:00
virtio_dma_buf.c virtio: virtio_dma_buf: fix missing parameter documentation 2025-08-01 09:11:08 -04:00
virtio_input.c virtio_input: Improve freeze handling 2025-08-26 03:38:19 -04:00
virtio_mem.c mm/page_isolation: remove migratetype parameter from more functions 2025-07-13 16:38:18 -07:00
virtio_mmio.c virtio-mmio: Remove virtqueue list from mmio device 2025-08-01 09:11:07 -04:00
virtio_pci_admin_legacy_io.c
virtio_pci_common.c
virtio_pci_common.h
virtio_pci_legacy.c
virtio_pci_legacy_dev.c virtio_pci: Fix misleading comment for queue vector 2025-08-26 03:38:10 -04:00
virtio_pci_modern.c virtio_pci_modern: allow configuring extended features 2025-07-08 18:05:07 +02:00
virtio_pci_modern_dev.c virtio_pci: Fix misleading comment for queue vector 2025-08-26 03:38:10 -04:00
virtio_ring.c virtio: document ENOSPC 2025-08-01 09:11:07 -04:00
virtio_rtc_arm.c
virtio_rtc_class.c
virtio_rtc_driver.c
virtio_rtc_internal.h
virtio_rtc_ptp.c
virtio_vdpa.c virtio, vhost: features, fixes 2025-08-01 14:17:48 -07:00