Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

This reverts commit dfd74a1edfaba5864276a2859190a8d242d18952.

This has been fixed by commit dca4436d1cf9e0d237c 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: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20200727091342.52325-4-roger.pau@citrix.com
Signed-off-by: Juergen Gross <jgross@suse.com>

authored by

Roger Pau Monne and committed by
Juergen Gross
f5ec6723 88a479ff

-14
-14
drivers/xen/balloon.c
··· 266 266 return NULL; 267 267 } 268 268 269 - #ifdef CONFIG_SPARSEMEM 270 - { 271 - unsigned long limit = 1UL << (MAX_PHYSMEM_BITS - PAGE_SHIFT); 272 - unsigned long pfn = res->start >> PAGE_SHIFT; 273 - 274 - if (pfn > limit) { 275 - pr_err("New System RAM resource outside addressable RAM (%lu > %lu)\n", 276 - pfn, limit); 277 - release_memory_resource(res); 278 - return NULL; 279 - } 280 - } 281 - #endif 282 - 283 269 return res; 284 270 } 285 271