Commit f5ec6723 authored by Roger Pau Monne's avatar Roger Pau Monne Committed by Juergen Gross

Revert "xen/balloon: Fix crash when ballooning on x86 32 bit PAE"

This reverts commit dfd74a1e.

This has been fixed by commit dca4436d which added the out
of bounds check to __add_memory, so that trying to add blocks past
MAX_PHYSMEM_BITS will fail.

Note the check in the Xen balloon driver was bogus anyway, as it
checked the start address of the resource, but it should instead test
the end address to assert the whole resource falls below
MAX_PHYSMEM_BITS.
Signed-off-by: default avatarRoger Pau Monné <roger.pau@citrix.com>
Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20200727091342.52325-4-roger.pau@citrix.comSigned-off-by: default avatarJuergen Gross <jgross@suse.com>
parent 88a479ff
......@@ -266,20 +266,6 @@ static struct resource *additional_memory_resource(phys_addr_t size)
return NULL;
}
#ifdef CONFIG_SPARSEMEM
{
unsigned long limit = 1UL << (MAX_PHYSMEM_BITS - PAGE_SHIFT);
unsigned long pfn = res->start >> PAGE_SHIFT;
if (pfn > limit) {
pr_err("New System RAM resource outside addressable RAM (%lu > %lu)\n",
pfn, limit);
release_memory_resource(res);
return NULL;
}
}
#endif
return res;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment