diff options
author | Will Deacon <will.deacon@arm.com> | 2011-04-28 18:44:31 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-05-12 10:52:00 +0100 |
commit | 9af386c8dc5a9dce56f36b484647ad6401758c85 (patch) | |
tree | b884faac285aeb76c07f73e118ef29ce94cd7156 /arch/arm/mm/tlb-v7.S | |
parent | 362607df9faa01fea6ae437b1a50645f33f393c0 (diff) | |
download | talos-op-linux-9af386c8dc5a9dce56f36b484647ad6401758c85.tar.gz talos-op-linux-9af386c8dc5a9dce56f36b484647ad6401758c85.zip |
ARM: 6890/1: memmap: only free allocated memmap entries when using SPARSEMEM
The SPARSEMEM code allocates memmap entries only for sections which are
present (i.e. those which contain some valid memory). The membank checks
in free_unused_memmap do not take this into account and can incorrectly
attempt to free memory which is not allocated, resulting in a BUG() in
the bootmem code.
However, if memory is configured as follows:
|<----section---->|<----hole---->|<----section---->|
+--------+--------+--------------+--------+--------+
| bank 0 | unused | | bank 1 | unused |
+--------+--------+--------------+--------+--------+
where a bank only occupies part of a section, the memmap allocated for
the remainder of the section *can* be freed.
This patch modifies the checks in free_unused_memmap so that only valid
memmap entries are considered for removal.
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/tlb-v7.S')
0 files changed, 0 insertions, 0 deletions