On Tue, Nov 18 2025, Pasha Tatashin wrote: >> When kho_restore_vmalloc() fails, it frees up the pages array, but not >> the pages it contains. These are the pages that were successfully >> restored using kho_restore_pages(). If the failure happens when >> restoring the pages, the ones successfully restored are leaked. If the >> failure happens when allocating the vm_area or when mapping the pages, >> all the pages of the preserved vmalloc buffer are leaked. > > Hm, I am not sure if KHO should be responsible for freeing the > restored pages. We don't know the content of those pages, and what > they are used for. They could be used by a hypervisor or a device. > Therefore, it may be better to keep them leaked, and let the caller > decide what to do next: i.e., boot into a maintenance mode, crash the > kernel, or allow the leak until the next reboot.
Hmm, fair point. This patch can be ignored then. -- Regards, Pratyush Yadav
