[PATCH] xen/grant-table: fix resource leak in gnttab_init()
Haoxiang Li
haoxiang_li2024 at 163.com
Thu Nov 19 21:56:55 PST 2026
At 2026-11-20 07:18:03, "Edgecombe, Rick P" <rick.p.edgecombe at intel.com> wrote:
>
>If the PV guest hits this scenario can it survive? I don't know xen pv very
>well. Does this means that the PV guest has no disk or network. If so, the user
>is probably not concerned with a one time memory leak.
Thanks for raising this. I tested an x86-64 PV Dom0 under Xen 4.17.7 in QEMU,
using ata_piix for storage and e1000 for networking.
I injected -ENOMEM immediately before the initial MFN-array allocation in
gnttab_map(), after arch_gnttab_init() had succeeded. With and without the
patch, gnttab_init() returned -ENODEV, but Dom0 still booted to userspace.
In both cases, disk I/O worked, and the network interface could reach the
QEMU gateway.
However, I agree that this is a one-time leak with limited impact. I have not
demonstrated any further user-visible consequences from the leak.
Regards,
Haoxiang Li
More information about the linux-arm-kernel
mailing list