ARM: 7555/1: kexec: fix segment memory addresses check

Commit c564df4db8 (ARM: 7540/1: kexec:
Check segment memory addresses) added a safety check with accidentally
reversed condition, and broke kexec functionality on ARM. Fix this.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
Aaro Koskinen 2012-10-16 19:35:14 +01:00 коммит произвёл Russell King
Родитель ddffeb8c4d
Коммит 2456f44dd7
1 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -45,10 +45,9 @@ int machine_kexec_prepare(struct kimage *image)
for (i = 0; i < image->nr_segments; i++) {
current_segment = &image->segment[i];
err = memblock_is_region_memory(current_segment->mem,
current_segment->memsz);
if (err)
return - EINVAL;
if (!memblock_is_region_memory(current_segment->mem,
current_segment->memsz))
return -EINVAL;
err = get_user(header, (__be32*)current_segment->buf);
if (err)