xen: arm: correct off-by-one error in consider_modules

By iterating up to <= mi->nr_mods we are running off the end of the boot
modules, but more importantly it causes us to then skip the first FDT reserved
region, meaning we might clobber it.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Julien Grall <julien.grall@linaro.org>
This commit is contained in:
Ian Campbell authored and Ian Campbell committed 2015-01-06 11:12:19 +00:00
1 parent 54eb18cd63
commit dea3ff6ed2
1 file changed
+1 -1
+1 -1
View File
@@ -286,7 +286,7 @@ static paddr_t __init consider_modules(paddr_t s, paddr_t e,
return 0;
/* First check the boot modules */
for ( i = first_mod; i <= mi->nr_mods; i++ )
for ( i = first_mod; i < mi->nr_mods; i++ )
{
paddr_t mod_s = mi->module[i].start;
paddr_t mod_e = mod_s + mi->module[i].size;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.