xen/arm: create_p2m_entries should not call free_domheap_page
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Tue, 9 Oct 2012 14:05:34 +0000 (15:05 +0100)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Tue, 9 Oct 2012 14:05:34 +0000 (15:05 +0100)
commita3d1dbc607dbf6c1ec77e91dd44afdbed7ff6cc4
treead9ed5154330f6af9e9c62aad3f91cb4c98ac662
parent48d56ac850f6ae8857a7e0b6d7b92335f8d90553
xen/arm: create_p2m_entries should not call free_domheap_page

The guest is entitled to leak a page from its p2m (by overwriting it) if
it wants to. Since the memory is effectively lost to it (can't even be
recovered by XENMEM increase reservation etc).

In these cases we shouldn't call free_domheap_page to free the existing
page from create_p2m_entries, because it resets the reference counting
but the page is still allocated to the guest (even if not in the p2m
anymore) and common grant_table code is also going to call put_page on
it.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/p2m.c