mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
xen: handle highmem pages correctly when shrinking a domain
Commit 1058a75f07 ("xen: actually release
memory when shrinking domain") causes a crash if the page being released
is a highmem page.
If a page is highmem then there is no need to unmap it.
Signed-off-by: Ian Campbell <[email protected]>
Acked-by: Jeremy Fitzhardinge <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
42ef73fe13
commit
ff4ce8c332
1 changed files with 7 additions and 4 deletions
|
|
@ -299,10 +299,13 @@ static int decrease_reservation(unsigned long nr_pages)
|
|||
|
||||
scrub_page(page);
|
||||
|
||||
ret = HYPERVISOR_update_va_mapping(
|
||||
(unsigned long)__va(pfn << PAGE_SHIFT),
|
||||
__pte_ma(0), 0);
|
||||
BUG_ON(ret);
|
||||
if (!PageHighMem(page)) {
|
||||
ret = HYPERVISOR_update_va_mapping(
|
||||
(unsigned long)__va(pfn << PAGE_SHIFT),
|
||||
__pte_ma(0), 0);
|
||||
BUG_ON(ret);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Ensure that ballooned highmem pages don't have kmaps. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue