[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 8 of 9] x86/mm: Make sharing ASSERT check more accurate
xen/arch/x86/mm/mem_sharing.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx> diff -r 244804e8a002 -r 12f7da67cefe xen/arch/x86/mm/mem_sharing.c --- a/xen/arch/x86/mm/mem_sharing.c +++ b/xen/arch/x86/mm/mem_sharing.c @@ -197,7 +197,12 @@ static struct page_info* mem_sharing_loo struct page_info* page = mfn_to_page(_mfn(mfn)); if ( page_get_owner(page) == dom_cow ) { - ASSERT(page->u.inuse.type_info & PGT_type_mask); + /* Count has to be at least two, because we're called + * with the mfn locked (1) and this is supposed to be + * a shared page (1). */ + ASSERT( (page->u.inuse.type_info & + (PGT_shared_page | PGT_count_mask)) >= + (PGT_shared_page | 2) ); ASSERT(get_gpfn_from_mfn(mfn) == SHARED_M2P_ENTRY); return page; } _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |