mirror of
https://github.com/torvalds/linux.git
synced 2026-09-11 02:48:03 +02:00
powerpc/kexec_file: Use inclusive range checks for excluded memory
arch_check_excluded_range() checks if a kexec segment overlaps an
excluded memory range.
Both ranges use inclusive end addresses, but the overlap check uses
exclusive comparisons. This skips ranges with start == ->ranges[i].end
or end == ->ranges[i].start. Use inclusive comparisons instead.
Fixes: 6e5250eaa6 ("powerpc/crash: use generic APIs to locate memory hole for kdump")
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20260810145827.157972-3-thorsten.blum@linux.dev
This commit is contained in:
parent
68832eb087
commit
449f60f99f
|
|
@ -57,7 +57,7 @@ int arch_check_excluded_range(struct kimage *image, unsigned long start,
|
|||
|
||||
emem = image->arch.exclude_ranges;
|
||||
for (i = 0; i < emem->nr_ranges; i++)
|
||||
if (start < emem->ranges[i].end && end > emem->ranges[i].start)
|
||||
if (start <= emem->ranges[i].end && end >= emem->ranges[i].start)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user