mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-08 18:57:22 +00:00
The page reporting callback submits an sg list to the reporting
virtqueue. With VIRTIO_RING_F_INDIRECT_DESC negotiated and
total_sg > 1 (which it typically is), virtqueue_add reports it to the
host by allocating an indirect descriptor via kmalloc(GFP_KERNEL).
This is not pretty: the reporting worker isolates potentially hundreds
of MB of free pages from the buddy allocator (reported pages are at
least pageblock_order, and the sg can contain up to
PAGE_REPORTING_CAPACITY entries of varying orders). As the result,
very theoretically, the kmalloc might trigger OOM when we have in fact a
ton of free memory.
Clear VIRTIO_RING_F_INDIRECT_DESC, to avoid using indirect descriptors.
Fixes:
|
History
|
|
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| virtio.c | ||
| virtio_anchor.c | ||
| virtio_balloon.c | ||
| virtio_debug.c | ||
| virtio_dma_buf.c | ||
| virtio_input.c | ||
| virtio_mem.c | ||
| virtio_mmio.c | ||
| 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_modern.c | ||
| virtio_pci_modern_dev.c | ||
| virtio_ring.c | ||
| virtio_rtc_arm.c | ||
| virtio_rtc_class.c | ||
| virtio_rtc_driver.c | ||
| virtio_rtc_internal.h | ||
| virtio_rtc_ptp.c | ||
| virtio_vdpa.c | ||