diff options
author | Keir Fraser <keir@xen.org> | 2010-12-09 10:14:57 +0000 |
---|---|---|
committer | Keir Fraser <keir@xen.org> | 2010-12-09 10:14:57 +0000 |
commit | 4dbf5ef7073b051ab7374f597914cd9678e087da (patch) | |
tree | bfa85427dfd122ba3c7450d3f7c1b9a11b6215a7 | |
parent | 605b23e6ed27c3aba743fa098b3fd257535701fe (diff) | |
download | xen-4dbf5ef7073b051ab7374f597914cd9678e087da.tar.gz xen-4dbf5ef7073b051ab7374f597914cd9678e087da.tar.bz2 xen-4dbf5ef7073b051ab7374f597914cd9678e087da.zip |
x86/mm: change ASSERTs to BUG_ONs in mem_sharing.c
These two ASSERTs have important side-effects so make them into
BUG_ONs
consistent with the rest of the file.
Bug found by Jui-Hao Chiang <juihaochiang@gmail.com>.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
xen-unstable changeset: 22467:89116f28083f
xen-unstable date: Wed Dec 08 10:46:31 2010 +0000
-rw-r--r-- | xen/arch/x86/mm/mem_sharing.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xen/arch/x86/mm/mem_sharing.c b/xen/arch/x86/mm/mem_sharing.c index cb461ac928..1f6bbfe2da 100644 --- a/xen/arch/x86/mm/mem_sharing.c +++ b/xen/arch/x86/mm/mem_sharing.c @@ -545,7 +545,7 @@ int mem_sharing_nominate_page(struct domain *d, * it a few lines above. * The mfn needs to revert back to rw type. This should never fail, * since no-one knew that the mfn was temporarily sharable */ - ASSERT(page_make_private(d, page) == 0); + BUG_ON(page_make_private(d, page) != 0); mem_sharing_hash_destroy(hash_entry); mem_sharing_gfn_destroy(gfn_info, 0); shr_unlock(); @@ -699,7 +699,7 @@ gfn_found: unmap_domain_page(s); unmap_domain_page(t); - ASSERT(set_shared_p2m_entry(d, gfn, page_to_mfn(page)) != 0); + BUG_ON(set_shared_p2m_entry(d, gfn, page_to_mfn(page)) == 0); put_page_and_type(old_page); private_page_found: |