Steven Price <steven.price@xxxxxxx> writes: > + > +out_undelegate_tables: > + while (--i >= 0) { > + phys_addr_t pgd_phys = kvm->arch.mmu.pgd_phys + i * PAGE_SIZE; > + > + WARN_ON(rmi_granule_undelegate(pgd_phys)); > + } > + WARN_ON(rmi_granule_undelegate(rd_phys)); > +free_rd: > + free_page((unsigned long)rd); > + return r; > +} > + we should avoid that free_page on an undelegate failure? rd_phys we can handle here. Not sure how to handle the pgd_phys. -aneesh