For order 32 or more, the shift will truncate. Spotted by Coverity.
Signed-off-by: Andrew Cooper <[email protected]>
---
CC: Jan Beulich <[email protected]>
CC: Wei Liu <[email protected]>
---
xen/common/page_alloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 1aec13e..88d1637 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -334,7 +334,7 @@ void __init init_boot_pages(paddr_t ps, paddr_t pe)
for ( i = 0; i < array_size; i++ )
{
bootmem_region_zap(badpage->mfn,
- badpage->mfn + (1U << badpage->order));
+ badpage->mfn + (1UL << badpage->order));
badpage++;
}
}
@@ -347,7 +347,7 @@ void __init init_boot_pages(paddr_t ps, paddr_t pe)
for ( i = 0; i < array_size; i++ )
{
bootmem_region_zap(badpage->mfn,
- badpage->mfn + (1U << badpage->order));
+ badpage->mfn + (1UL << badpage->order));
badpage++;
}
}
--
2.1.4
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel