Browse Source

xtensa: fix sysmem reservation at the end of existing block

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>
Max Filippov 11 years ago
parent
commit
be6ae382dc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      arch/xtensa/mm/init.c

+ 1 - 1
arch/xtensa/mm/init.c

@@ -191,7 +191,7 @@ int __init mem_reserve(unsigned long start, unsigned long end, int must_exist)
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 
-	if (it && start - it->start < bank_sz) {
+	if (it && start - it->start <= bank_sz) {
 		if (start == it->start) {
 		if (start == it->start) {
 			if (end - it->start < bank_sz) {
 			if (end - it->start < bank_sz) {
 				it->start = end;
 				it->start = end;