[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen: arm: don't release modules which aren't in RAM into the heap
commit 597eaa8db932741f4b49336d5638c5a1833d4f2f Author: Ian Campbell <ian.campbell@xxxxxxxxxx> AuthorDate: Wed Jul 23 17:45:30 2014 +0100 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Thu Jul 24 16:23:18 2014 +0100 xen: arm: don't release modules which aren't in RAM into the heap They might be in e.g. flash or something but more likely they could be in a bank of RAM which we aren't handling or in RAM which the bootloader hasn't told us about for some reason. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Acked-by: Julien Grall <julien.grall@xxxxxxxxxx> Cc: Fu Wei <fu.wei@xxxxxxxxxx> Cc: Roy Franz <roy.franz@xxxxxxxxxx> --- xen/arch/arm/setup.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index e53e491..446b4dc 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -247,8 +247,13 @@ void __init discard_initial_modules(void) paddr_t s = mi->module[i].start; paddr_t e = s + PAGE_ALIGN(mi->module[i].size); - if ( mi->module[i].kind != BOOTMOD_XEN ) - dt_unreserved_regions(s, e, init_domheap_pages, 0); + if ( mi->module[i].kind == BOOTMOD_XEN ) + continue; + + if ( !mfn_valid(paddr_to_pfn(s)) || !mfn_valid(paddr_to_pfn(e))) + continue; + + dt_unreserved_regions(s, e, init_domheap_pages, 0); } mi->nr_mods = 0; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |