mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
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:
1 parent
54eb18cd63
commit
dea3ff6ed2
1 file changed
+1
-1
@@ -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;
|
||||
|
||||