x86/mem-paging: further adjustments to p2m_mem_paging_prep()'s error handling
PATCH 1/1 x86/mem-paging: further adjustments to p2m_mem_paging_prep()'s error handling
Address late comments on ecb913be4aaa ("x86/mem-paging: correct p2m_mem_paging_prep()'s error handling"):
- insert a gprintk() ahead of domain_crash(),
- add a comment.
Requested-by Andrew Cooper <[email protected]>
Signed-off-by Jan Beulich <[email protected]>
xen/arch/x86/mm/mem_paging.c +7 -0
@@ -385,6 +385,9 @@ static int prepare(struct domain *d, gfn* The domain can't possibly know about this page yet, so failure * here is a clear indication of something fishy going on. */ +gprintk (XENLOG_ERR , +"%pd: fresh page for GFN %" PRI_gfn" in unexpected state\n" , + d,gfn_x (gfn));domain_crash (d); page =NULL ; goto out;
@@ -423,6 +426,10 @@ static int prepare(struct domain *d, gfnif ( page ) { +/* +* Free the page on error. Drop our temporary reference in all +* cases. +*/ if ( ret )put_page_alloc_ref (page);put_page (page);
Quoted 7 lines · Jan Beulich
Address late comments on
ecb913be4aaa("x86/mem-paging: correct p2m_mem_paging_prep()'s error handling"):
- insert agprintk()ahead ofdomain_crash(),
- add a comment.Requested-by Andrew Cooper <[email protected]>Signed-off-by Jan Beulich <[email protected]>
Reviewed-by Andrew Cooper <[email protected]>