forked from luck/tmp_suning_uos_patched
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:
parent
ddffeb8c4d
commit
2456f44dd7
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user