Skip to content

Commit

Permalink
xtensa: fix sysmem reservation at the end of existing block
Browse files Browse the repository at this point in the history
When sysmem reservation occurs exactly at the end of an existing block
that block is deleted, because it is incorrectly included in the range
of memblocks to remove. Fix that by skipping such block.

Cc: stable@vger.kernel.org
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
  • Loading branch information
Max Filippov committed Jun 9, 2014
1 parent 1729023 commit be6ae38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/xtensa/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ int __init mem_reserve(unsigned long start, unsigned long end, int must_exist)
return -EINVAL;
}

if (it && start - it->start < bank_sz) {
if (it && start - it->start <= bank_sz) {
if (start == it->start) {
if (end - it->start < bank_sz) {
it->start = end;
Expand Down

0 comments on commit be6ae38

Please sign in to comment.