mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
ARM: remove unreachable invalid range check in kasan_init()
kasan_init() maps each memblock region with for_each_mem_range(), which guarantees pa_start < pa_end. Then it skips any region with pa_start >= arm_lowmem_limit, so pa_start < arm_lowmem_limit is guaranteed as well. When pa_end <= arm_lowmem_limit, pa_start < pa_end means start < end, so the start >= end check is unreachable. When pa_end > arm_lowmem_limit, end is clamped to __va(arm_lowmem_limit), and pa_start < arm_lowmem_limit means start < end, so the check is unreachable as well. No functional change. Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com> Link: https://patch.msgid.link/20260630150413.1718632-6-ekffu200098@gmail.com Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
This commit is contained in:
parent
8008f6995d
commit
3db1a9ccf9
|
|
@ -262,12 +262,6 @@ void __init kasan_init(void)
|
|||
&pa_start, &pa_end, &arm_lowmem_limit);
|
||||
end = __va(arm_lowmem_limit);
|
||||
}
|
||||
if (start >= end) {
|
||||
pr_info("Skipping invalid memory block %pa-%pa (virtual %p-%p)\n",
|
||||
&pa_start, &pa_end, start, end);
|
||||
continue;
|
||||
}
|
||||
|
||||
create_mapping(start, end);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user