소스 검색

avr32: Fix bug in early resource allocation code

add_reserved_region() tries to keep the resource list sorted, so when
looking for a place to insert the new resource, it may break out
before the last entry.

When this happens, the list is broken in two because the sibling field
of the new entry doesn't point to the next resource. Fix it by
updating the new resource's sibling field appropriately.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Haavard Skinnemoen 17 년 전
부모
커밋
a2a3952561
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      arch/avr32/kernel/setup.c

+ 1 - 0
arch/avr32/kernel/setup.c

@@ -163,6 +163,7 @@ add_reserved_region(resource_size_t start, resource_size_t end,
 	new->start = start;
 	new->end = end;
 	new->name = name;
+	new->sibling = next;
 	new->flags = IORESOURCE_MEM;
 
 	*pprev = new;