mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
x86/mm: account for PGT_pae_xen_l2 in recently added assertion
While PGT_pae_xen_l2 will be zapped once the type refcount of an L2 page reaches zero, it'll be retained as long as the type refcount is non- zero. Hence any checking against the requested type needs to either zap the bit from the type or include it in the used mask. Fixes:9186e96b19("x86/pv: Clean up _get_page_type()") Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> master commit:c2095ac76bmaster date: 2022-06-10 10:21:06 +0200
This commit is contained in:
1 parent
dc020d8d1b
commit
0b4e62847c
1 file changed
+2
-1
+2
-1
@@ -2928,7 +2928,8 @@ static int _get_page_type(struct page_info *page, unsigned long type,
|
||||
* The page is in one of two states (depending on PGT_partial),
|
||||
* and should have exactly one reference.
|
||||
*/
|
||||
ASSERT((x & (PGT_type_mask | PGT_count_mask)) == (type | 1));
|
||||
ASSERT((x & (PGT_type_mask | PGT_pae_xen_l2 | PGT_count_mask)) ==
|
||||
(type | 1));
|
||||
|
||||
if ( !(x & PGT_partial) )
|
||||
{
|
||||
|
||||